Examples of Duct


Examples of cascading.flow.stream.duct.Duct

    return flowProcess.mergeMapIntoConfig( conf, priorConf );
    }

  private InputSource handleHead( FlowElement source, FlowProcess flowProcess )
    {
    Duct sourceDuct;

    if( source instanceof Tap )
      sourceDuct = createSourceStage( (Tap) source, flowProcess );
    else if( source instanceof Merge )
      sourceDuct = createMergeStage( (Merge) source, IORole.source );
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

    LinkedList<Duct> successors = new LinkedList<Duct>( Graphs.successorListOf( ductGraph, current ) );
    ListIterator<Duct> iterator = successors.listIterator();

    while( iterator.hasNext() )
      {
      Duct successor = iterator.next();

      if( successor == getHEAD() )
        throw new IllegalStateException( "HEAD may not be next" );

      if( successor == getTAIL() ) // tail is not included, its just a marker
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

    LinkedList<Duct> predecessors = new LinkedList<Duct>( Graphs.predecessorListOf( ductGraph, current ) );
    ListIterator<Duct> iterator = predecessors.listIterator();

    while( iterator.hasNext() )
      {
      Duct successor = iterator.next();

      if( successor == getTAIL() )
        throw new IllegalStateException( "TAIL may not be successor" );

      if( successor == getHEAD() ) // head is not included, its just a marker
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

    Set<DuctGraph.Ordinal> edges = ductGraph.outgoingEdgesOf( current );

    if( edges.size() == 0 )
      throw new IllegalStateException( "ducts must have an outgoing edge, current: " + current );

    Duct next = ductGraph.getEdgeTarget( edges.iterator().next() );

    if( current instanceof Gate )
      {
      if( !( current instanceof Window ) ) // just collapse - Merge
        {
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

      else if( !isSource && isSink )
        role = IORole.sink;
      else if( isSource && isSink )
        role = IORole.both;

      Duct newRhsDuct = createDuctFor( rhsElement, role );
      Duct rhsDuct = findExisting( newRhsDuct );

      int ordinal = findEdgeOrdinal( lhsDuct, rhsDuct );

      addPath( lhsDuct, ordinal, rhsDuct );
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

    throw new IllegalStateException( "could not find ordinal, too many edges between elements" );
    }

  private Duct createDuctFor( FlowElement element, IORole role )
    {
    Duct rhsDuct;

    if( element instanceof Each )
      {
      Each eachElement = (Each) element;
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

  protected void buildGraph()
    {
    Group group = (Group) Util.getFirst( node.getSourceElements() );

    Duct rhsDuct;

    if( group.isGroupBy() )
      rhsDuct = new HadoopGroupByGate( flowProcess, (GroupBy) group, IORole.source );
    else
      rhsDuct = new HadoopCoGroupGate( flowProcess, (CoGroup) group, IORole.source );
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

      {
      try
        {
        while( iterator.hasNext() )
          {
          Duct next = iterator.next();

          if( next != streamedHead )
            ( (InputSource) next ).run( null );
          }
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

      {
      try
        {
        while( iterator.hasNext() )
          {
          Duct next = iterator.next();

          if( next != streamedHead )
            ( (SourceStage) next ).run( null );
          }
View Full Code Here

Examples of cascading.flow.stream.duct.Duct

  protected void buildGraph()
    {
    for( Object rhsElement : node.getSourceTaps() )
      {
      Duct rhsDuct = new SourceStage( tapFlowProcess( (Tap) rhsElement ), (Tap) rhsElement );

      addHead( rhsDuct );

      handleDuct( (FlowElement) rhsElement, rhsDuct );
      }
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.