Package cascading.flow.planner.iso.subgraph

Examples of cascading.flow.planner.iso.subgraph.SubGraphIterator


//    ruleRegistry.addRule( new RuleContractedTransform( PlanPhase.PreResolve, new NoOpPipeExpression() ) );

    RuleResult ruleResult = new RuleExec( ruleRegistry ).executeRulePhase( PlanPhase.PreResolveAssembly, plannerContext, new RuleResult( new StandardElementGraph() ) );
    FlowElementGraph flowElementGraph = ruleResult.getAssemblyGraph();

    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new PlannerContext(),
      new NoGroupTapExpressionGraph(),
      new TapGroupTapExpressionGraph(),
      flowElementGraph
    );

    while( iterator.hasNext() )
      assertNotNull( iterator.next() );

    }
View Full Code Here


    Transformed<ElementGraph> transformed = transformer.transform( plannerContext, flowElementGraph );

    transformed.writeDOTs( getPlanPath() + "/transform/" );

    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new PlannerContext(),
      new TestNoGroupTapExpressionGraph(),
      new TestConsecutiveTapsExpressionGraph(),
      false,
      flowElementGraph
    );

    RemoveBranchGraphTransformer removeTransformer = new RemoveBranchGraphTransformer( new TestMalformedJoinExpressionGraph() );

    int count = 0;
    while( iterator.hasNext() )
      {
      ElementGraph next = iterator.next();
      assertNotNull( next );
      next.writeDOT( getPlanPath() + "/pipeline/" + count + "-graph.dot" );

      Transformed<ElementGraph> result = removeTransformer.transform( next );
View Full Code Here

    {
    Map<ElementGraph, EnumMultiMap> annotatedSubGraphs = new LinkedHashMap<>();

    ExpressionSubGraphIterator expressionIterator = new ExpressionSubGraphIterator( plannerContext, contractionGraph, expressionGraph, elementGraph, excludes );

    SubGraphIterator stepIterator = wrapIterator( expressionIterator );

    while( stepIterator.hasNext() )
      {
      ElementGraph next = stepIterator.next();
      EnumMultiMap annotationMap = stepIterator.getAnnotationMap( annotations );

      annotatedSubGraphs.put( next, annotationMap );
      }

    return new Partitions( this, elementGraph, expressionIterator.getContractedGraph(), expressionIterator.getMatches(), annotatedSubGraphs );
View Full Code Here

  public static <F extends FlowElement> Set<F> findSources( ElementGraph elementGraph, Class<F> type )
    {
    if( elementGraph.containsVertex( Extent.head ) )
      return narrowSet( type, Graphs.successorListOf( elementGraph, Extent.head ) );

    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new ExpressionGraph( SearchOrder.Topological, new FlowElementExpression( ElementCapture.Primary, type, TypeExpression.Topo.Head ) ),
      elementGraph
    );

    return narrowSet( type, getAllVertices( iterator ) );
View Full Code Here

  public static <F extends FlowElement> Set<F> findSinks( ElementGraph elementGraph, Class<F> type )
    {
    if( elementGraph.containsVertex( Extent.tail ) )
      return narrowSet( type, Graphs.predecessorListOf( elementGraph, Extent.tail ) );

    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new ExpressionGraph( SearchOrder.ReverseTopological, new FlowElementExpression( ElementCapture.Primary, type, TypeExpression.Topo.Tail ) ),
      elementGraph
    );

    return narrowSet( type, getAllVertices( iterator ) );
View Full Code Here

    return findSinks( elementGraph, Tap.class );
    }

  public static Set<Group> findAllGroups( ElementGraph elementGraph )
    {
    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new ExpressionGraph( SearchOrder.Topological, new FlowElementExpression( ElementCapture.Primary, Group.class ) ),
      elementGraph
    );

    return narrowSet( Group.class, getAllVertices( iterator ) );
View Full Code Here

    return narrowSet( Group.class, getAllVertices( iterator ) );
    }

  public static Set<HashJoin> findAllHashJoins( ElementGraph elementGraph )
    {
    SubGraphIterator iterator = new ExpressionSubGraphIterator(
      new ExpressionGraph( SearchOrder.Topological, new FlowElementExpression( ElementCapture.Primary, HashJoin.class ) ),
      elementGraph
    );

    return narrowSet( HashJoin.class, getAllVertices( iterator ) );
View Full Code Here

TOP

Related Classes of cascading.flow.planner.iso.subgraph.SubGraphIterator

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.