Package cascading.flow

Examples of cascading.flow.Flow.complete()


      sinks.put(sinkName, sink);
      i++;
    }

    Flow f = mFlowConnector.connect(sources, sinks, tails);
    f.complete();
    return f;
  }

  /**
   * Fails Junit if tuple entry iterator entries do not match the expected list.
View Full Code Here


public class CascadingUtils {
    public static void identityFlow(Tap source, Tap sink, Fields selectFields) {
        Pipe pipe = new Pipe("pipe");
        pipe = new Each(pipe, selectFields, new Identity());
        Flow flow = new HadoopFlowConnector().connect(source, sink, pipe);
        flow.complete();
    }

    // Mark the output dir of the job for which the context is passed.
    public static void markSuccessfulOutputDir(Path path, JobConf conf) throws IOException {
        FileSystem fs = FileSystem.get(conf);
View Full Code Here

      }

    // write a DOT file and run the flow
    Flow classifyFlow = flowConnector.connect( flowDef );
    classifyFlow.writeDOT( "dot/classify.dot" );
    classifyFlow.complete();
    }
  }
View Full Code Here

    flowDef.addAssemblyPlanner( pmmlPlanner );

    Flow flow = new LocalFlowConnector().connect( flowDef );

    flow.complete();

    TupleEntryIterator iterator = resultsTap.openForRead( flow.getFlowProcess() );

    while( iterator.hasNext() )
      System.out.println( iterator.next() );
View Full Code Here

      throw exception;
      }

    flow.writeDOT( getFlowPlanPath() + "/plan.dot" );

    flow.complete();

    LOG.debug( "source = {}", source.getSourceFields().printVerbose() );
    LOG.debug( "sink   = {}", sink.getSinkFields().printVerbose() );

    Fields sourceSelector = source.getSourceFields().subtract( trainingFields );
View Full Code Here

    Flow flow = getPlatform().getFlowConnector().connect( flowDef );

    flow.writeDOT( getFlowPlanPath() + "/plan.dot" );

    flow.complete();

    Fields sourceSelector = source.getSourceFields();
    Fields sinkSelector = sink.getSinkFields();

    LOG.debug( "source select = {}", sourceSelector.printVerbose() );
View Full Code Here

    Tap replaceTap = new JDBCTap( url, driver, tableDesc, new JDBCScheme( columnNames ), SinkMode.REPLACE );

    Flow parseFlow = new FlowConnector( getProperties() ).connect( source, replaceTap, parsePipe );

    parseFlow.complete();

    verifySink( parseFlow, 13 );

    // READ DATA FROM TABLE INTO TEXT FILE
View Full Code Here

    Pipe copyPipe = new Each( "read", new Identity() );

    Flow copyFlow = new FlowConnector( getProperties() ).connect( replaceTap, sink, copyPipe );

    copyFlow.complete();

    verifySink( copyFlow, 13 );

    // READ DATA FROM TEXT FILE AND UPDATE TABLE
View Full Code Here

    JDBCScheme jdbcScheme = new JDBCScheme( columnNames, null, new String[]{"num", "lower"} );
    Tap updateTap = new JDBCTap( url, driver, tableDesc, jdbcScheme, SinkMode.APPEND );

    Flow updateFlow = new FlowConnector( getProperties() ).connect( sink, updateTap, parsePipe );

    updateFlow.complete();

    verifySink( updateFlow, 13 );

    // READ DATA FROM TABLE INTO TEXT FILE, USING CUSTOM QUERY
View Full Code Here

    Pipe readPipe = new Each( "read", new Identity() );

    Flow readFlow = new FlowConnector( getProperties() ).connect( sourceTap, sink, readPipe );

    readFlow.complete();

    verifySink( readFlow, 13 );
    }

  public void testJDBCAliased() throws IOException
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.