Package cascading.tuple

Examples of cascading.tuple.TupleEntry.selectTuple()


        // it's ok to use NULL here so the collector does not write anything
        TupleEntry tupleEntry = sinkCall.getOutgoingEntry();
        OutputCollector outputCollector = sinkCall.getOutput();
        if( updateBy != null )
        {
            Tuple allValues = tupleEntry.selectTuple( updateValueFields );
            Tuple updateValues = tupleEntry.selectTuple( updateByFields );

            allValues = cleanTuple( allValues );

            TupleRecord key = new TupleRecord( allValues );
View Full Code Here


        TupleEntry tupleEntry = sinkCall.getOutgoingEntry();
        OutputCollector outputCollector = sinkCall.getOutput();
        if( updateBy != null )
        {
            Tuple allValues = tupleEntry.selectTuple( updateValueFields );
            Tuple updateValues = tupleEntry.selectTuple( updateByFields );

            allValues = cleanTuple( allValues );

            TupleRecord key = new TupleRecord( allValues );
View Full Code Here

                outputCollector.collect( key, key );

            return;
        }

        Tuple result = tupleEntry.selectTuple( getSinkFields() );

        result = cleanTuple( result );

        outputCollector.collect( new TupleRecord( result ), null );
    }
View Full Code Here

    Set<Tuple> set = new TreeSet<Tuple>();

    TupleEntry input = functionCall.getArguments();

    for( Fields field : fields )
      set.add( input.selectTuple( field ) );

    int i = 0;
    Tuple inputCopy = new Tuple( input.getTuple() );

    for( Tuple tuple : set )
View Full Code Here

    TupleEntry[] argumentEntries = context.argumentEntries;

    for( int i = 0; i < argumentSelectors.length; i++ )
      {
      Tuple selected = arguments.selectTuple( argumentSelectors[ i ] );

      argumentEntries[ i ].setTuple( selected );

      if( filters[ i ].isRemove( flowProcess, context.calls[ i ] ) )
        return true;
View Full Code Here

    TupleEntry[] argumentEntries = context.argumentEntries;

    for( int i = 0; i < argumentSelectors.length; i++ )
      {
      Tuple selected = arguments.selectTuple( argumentSelectors[ i ] );

      argumentEntries[ i ].setTuple( selected );

      if( !filters[ i ].isRemove( flowProcess, context.calls[ i ] ) )
        return false;
View Full Code Here

  @Override
  public void sink(FlowProcess<JobConf> flowProcess, SinkCall<Object[], OutputCollector> sinkCall)
      throws IOException {
    TupleEntry tupleEntry = sinkCall.getOutgoingEntry();
    OutputCollector outputCollector = sinkCall.getOutput();
    Tuple key = tupleEntry.selectTuple(keyField);
    ImmutableBytesWritable keyBytes = (ImmutableBytesWritable) key.getObject(0);
    Put put = new Put(keyBytes.get());

    for (int i = 0; i < valueFields.length; i++) {
      Fields fieldSelector = valueFields[i];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.