Package cascading.tuple

Examples of cascading.tuple.Tuple.clear()


    boolean result = sourceCall.getInput().next(key, value);

    if (!result) { return false; }

    Tuple tuple = sourceCall.getIncomingEntry().getTuple();
    tuple.clear();

    tuple.add(getBytes(key));
    tuple.add(getBytes(value));

    return true;
View Full Code Here


        Tuple result = new Tuple(); // is re-used

        @Override
        public Tuple makeResult( Tuple[] tuples )
          {
          result.clear();

          // flatten the results into one Tuple
          for( Tuple lastValue : tuples )
            result.addAll( lastValue );
View Full Code Here

    if( !matcher.find() )
      throw new OperationException( "could not match pattern: [" + getPatternString() + "] with value: [" + value + "]" );

    Tuple output = functionCall.getContext().getRhs();

    output.clear();

    if( groups != null )
      onGivenGroups( functionCall, matcher, output );
    else
      onFoundGroups( functionCall, matcher, output );
View Full Code Here

    if( value == null )
      value = "";

    Tuple output = functionCall.getContext().getRhs();

    output.clear();

    String[] split = functionCall.getContext().getLhs().split( value, length );

    for( int i = 0; i < split.length; i++ )
      output.add( split[ i ] );
View Full Code Here

  @Override
  public void operate( FlowProcess flowProcess, FunctionCall<Pair<DocumentBuilder, Tuple>> functionCall )
    {
    Tuple tuple = functionCall.getContext().getRhs();

    tuple.clear();

    String argument = functionCall.getArguments().getString( 0 );
    Document document = parseDocument( functionCall.getContext().getLhs(), argument );

    for( int i = 0; i < getExpressions().size(); i++ )
View Full Code Here

    boolean result = sourceCall.getInput().next(NullWritable.get(), value);

    if (!result) return false;

    Tuple tuple = sourceCall.getIncomingEntry().getTuple();
    tuple.clear();

    Message.Builder builder = getPrototype();
    builder.clear();
    if (registry != null) {
      tuple.add(builder.mergeFrom(value.getBytes(), 0, value.getLength(), registry).build());
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.