Package cascading

Examples of cascading.TestFunction


        {
        for( Fields out : OUTS_PASS )
          {
          try
            {
            new Each( new Pipe( "test" ), arg, new TestFunction( func, new Tuple( "value" ) ), out );
            }
          catch( Exception exception )
            {
            fail( "failed on: " + arg.print() + " " + func.print() + " " + out.print() );
            }
View Full Code Here


        {
        for( Fields out : OUTS_PASS )
          {
          try
            {
            new Each( new Pipe( "test" ), arg, new TestFunction( func, new Tuple( "value" ) ), out );
            fail( "failed on: " + arg.print() + " " + func.print() + " " + out.print() );
            }
          catch( Exception exception )
            {
            }
          }
        }
      }
    for( Fields arg : ARGS_PASS )
      {
      for( Fields func : FUNCS_FAIL )
        {
        for( Fields out : OUTS_PASS )
          {
          try
            {
            new Each( new Pipe( "test" ), arg, new TestFunction( func, new Tuple( "value" ) ), out );
            fail( "failed on: " + arg.print() + " " + func.print() + " " + out.print() );
            }
          catch( Exception exception )
            {
            }
          }
        }
      }
    for( Fields arg : ARGS_PASS )
      {
      for( Fields func : FUNCS_PASS )
        {
        for( Fields out : OUTS_FAIL )
          {
          try
            {
            new Each( new Pipe( "test" ), arg, new TestFunction( func, new Tuple( "value" ) ), out );
            fail( "failed on: " + arg.print() + " " + func.print() + " " + out.print() );
            }
          catch( Exception exception )
            {
            }
View Full Code Here

public class EachAssemblyFactory extends AssemblyFactory
  {
  public Pipe createAssembly( Pipe pipe, Fields argFields, Fields declFields, String fieldValue, Fields selectFields )
    {
    return new Each( pipe, argFields, new TestFunction( declFields, new Tuple( fieldValue ) ), selectFields );
    }
View Full Code Here

    pipe = new GroupBy( pipe, new Fields( "ip" ) );

    pipe = new Every( pipe, new Count(), new Fields( "ip", "count" ) );

    pipe = new Each( pipe, new TestFunction( new Fields( "insert" ), new Tuple( "value" ), fail ? 2 : -1 ) );

    Tap sink = getPlatform().getTextFile( sinkPath, SinkMode.REPLACE );

    FlowDef flowDef = FlowDef.flowDef()
      .setName( "restartable" )
View Full Code Here

    Tap sink2 = new Hfs( new TextLine(), "foo/split2", true );

    Pipe pipe = new Pipe( "split" );

    // this operation is not safe
    pipe = new Each( pipe, new Fields( "line" ), new TestFunction( new Fields( "ignore" ), new Tuple( 1 ), false ), new Fields( "line" ) );

    pipe = new Each( pipe, new Fields( "line" ), new RegexFilter( "^68.*" ) );

    Pipe left = new Each( new Pipe( "left", pipe ), new Fields( "line" ), new RegexFilter( ".*46.*" ) );
    Pipe right = new Each( new Pipe( "right", pipe ), new Fields( "line" ), new RegexFilter( ".*192.*" ) );
View Full Code Here

    Tap sink2 = new Hfs( new TextLine(), "foo/split2", true );

    Pipe pipe = new Pipe( "split" );

    // this operation is not safe
    pipe = new Each( pipe, new Fields( "line" ), new TestFunction( new Fields( "ignore" ), new Tuple( 1 ), false ), new Fields( "line" ) );

    Pipe left = new Each( new Pipe( "left", pipe ), new Fields( "line" ), new RegexFilter( ".*46.*" ) );
    Pipe right = new Each( new Pipe( "right", pipe ), new Fields( "line" ), new RegexFilter( ".*192.*" ) );

    Map sources = new HashMap();
View Full Code Here

    Tap sink3 = new Hfs( new TextLine(), "foo/split3", true );

    Pipe pipe = new Pipe( "split" );

    // this operation is not safe
    pipe = new Each( pipe, new Fields( "line" ), new TestFunction( new Fields( "ignore" ), new Tuple( 1 ), false ), new Fields( "line" ) );

    pipe = new Each( pipe, new Fields( "line" ), new RegexFilter( "^68.*" ) );

    pipe = new Pipe( "middle", pipe );

View Full Code Here

TOP

Related Classes of cascading.TestFunction

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.