Package cascading.operation

Examples of cascading.operation.ConcreteCall


  @Override
  public void setUp() throws Exception
    {
    super.setUp();

    operationCall = new ConcreteCall();
    }
View Full Code Here


  @Override
  public void setUp() throws Exception
    {
    super.setUp();

    operationCall = new ConcreteCall();
    }
View Full Code Here

    return new TupleEntry( Fields.size( tuple.size() ), tuple );
    }

  private void assertFail( ValueAssertion assertion, TupleEntry tupleEntry )
    {
    ConcreteCall concreteCall = getOperationCall( tupleEntry );
    assertion.prepare( FlowProcess.NULL, concreteCall );
    try
      {
      assertion.doAssert( FlowProcess.NULL, concreteCall );
      fail();
View Full Code Here

      }
    }

  private ConcreteCall getOperationCall( TupleEntry tupleEntry )
    {
    ConcreteCall operationCall = new ConcreteCall( tupleEntry.getFields() );
    operationCall.setArguments( tupleEntry );
    return operationCall;
    }
View Full Code Here

    return operationCall;
    }

  private void assertPass( ValueAssertion assertion, TupleEntry tupleEntry )
    {
    ConcreteCall concreteCall = getOperationCall( tupleEntry );
    assertion.prepare( FlowProcess.NULL, concreteCall );
    assertion.doAssert( FlowProcess.NULL, concreteCall );
    }
View Full Code Here

    return invokeFunction( function, new TupleEntry( arguments ), resultFields );
    }

  public static TupleListCollector invokeFunction( Function function, TupleEntry arguments, Fields resultFields )
    {
    ConcreteCall operationCall = new ConcreteCall( arguments.getFields() );
    TupleListCollector collector = new TupleListCollector( resultFields, true );

    operationCall.setArguments( arguments );
    operationCall.setOutputCollector( collector );

    function.prepare( FlowProcess.NULL, operationCall );
    function.operate( FlowProcess.NULL, operationCall );
    function.cleanup( FlowProcess.NULL, operationCall );
View Full Code Here

    return invokeFunction( function, entries, resultFields );
    }

  public static TupleListCollector invokeFunction( Function function, TupleEntry[] argumentsArray, Fields resultFields )
    {
    ConcreteCall operationCall = new ConcreteCall( argumentsArray[ 0 ].getFields() );
    TupleListCollector collector = new TupleListCollector( resultFields, true );

    function.prepare( FlowProcess.NULL, operationCall );
    operationCall.setOutputCollector( collector );

    for( TupleEntry arguments : argumentsArray )
      {
      operationCall.setArguments( arguments );
      function.operate( FlowProcess.NULL, operationCall );
      }

    function.cleanup( FlowProcess.NULL, operationCall );
View Full Code Here

    return invokeFilter( filter, new TupleEntry( arguments ) );
    }

  public static boolean invokeFilter( Filter filter, TupleEntry arguments )
    {
    ConcreteCall operationCall = new ConcreteCall( arguments.getFields() );

    operationCall.setArguments( arguments );

    filter.prepare( FlowProcess.NULL, operationCall );

    boolean isRemove = filter.isRemove( FlowProcess.NULL, operationCall );
View Full Code Here

    return invokeFilter( filter, entries );
    }

  public static boolean[] invokeFilter( Filter filter, TupleEntry[] argumentsArray )
    {
    ConcreteCall operationCall = new ConcreteCall( argumentsArray[ 0 ].getFields() );

    filter.prepare( FlowProcess.NULL, operationCall );

    boolean[] results = new boolean[ argumentsArray.length ];

    for( int i = 0; i < argumentsArray.length; i++ )
      {
      operationCall.setArguments( argumentsArray[ i ] );

      results[ i ] = filter.isRemove( FlowProcess.NULL, operationCall );
      }

    filter.flush( FlowProcess.NULL, operationCall );
View Full Code Here

    return invokeAggregator( aggregator, null, argumentsArray, resultFields );
    }

  public static TupleListCollector invokeAggregator( Aggregator aggregator, TupleEntry group, TupleEntry[] argumentsArray, Fields resultFields )
    {
    ConcreteCall operationCall = new ConcreteCall( argumentsArray[ 0 ].getFields() );

    operationCall.setGroup( group );

    aggregator.prepare( FlowProcess.NULL, operationCall );

    aggregator.start( FlowProcess.NULL, operationCall );

    for( TupleEntry arguments : argumentsArray )
      {
      operationCall.setArguments( arguments );
      aggregator.aggregate( FlowProcess.NULL, operationCall );
      }

    TupleListCollector collector = new TupleListCollector( resultFields, true );
    operationCall.setOutputCollector( collector );

    aggregator.complete( FlowProcess.NULL, operationCall );

    aggregator.cleanup( null, operationCall );
View Full Code Here

TOP

Related Classes of cascading.operation.ConcreteCall

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.