Package cascading.flow.planner.graph

Examples of cascading.flow.planner.graph.ElementGraph


    Map<ElementGraph, List<? extends ElementGraph>> levelResults = ruleResult.getLevelResults( phase.getLevel() );

    for( Map.Entry<ElementGraph, List<? extends ElementGraph>> entry : levelResults.entrySet() )
      {
      ElementGraph parent = entry.getKey(); // null for root case
      List<? extends ElementGraph> children = entry.getValue();

      List<ElementGraph> results = new ArrayList<>();

      for( ElementGraph child : children )
        {
        Transformed transformed = transformer.transform( plannerContext, child );

        writeTrace( ruleResult, phase, (Rule) transformer, parent, child, transformed );

        ElementGraph endGraph = transformed.getEndGraph();

        if( endGraph != null )
          results.add( endGraph );
        else
          results.add( child );
View Full Code Here


    Transformed contractedTransformed = graphTransformer.transform( plannerContext, rootGraph ); // contracted graph transform

    transformed.addChildTransform( contractedTransformed );

    // apply contracted sub-graph matcher to get the bounded sub-graph of the original graph
    ElementGraph contractedGraph = contractedTransformed.getEndGraph();

    Match match = findAllPrimaries ? subGraphFinder.findAllMatches( plannerContext, contractedGraph ) : subGraphFinder.findFirstMatch( plannerContext, contractedGraph );

    if( !match.foundMatch() )
      return transformed;

    ElementGraph contractedSubGraph = match.getMatchedGraph();

    ElementSubGraph resultSubGraph = asSubGraphOf( rootGraph, contractedSubGraph ); // the bounded sub-graph of the rootGraph

    transformed.setEndGraph( resultSubGraph );
View Full Code Here

    Transformed child = graphTransformer.transform( transformed.getPlannerContext(), graph );

    transformed.addChildTransform( child );

    ElementGraph endGraph = child.getEndGraph();

    return makeAnnotated( endGraph );
    }
View Full Code Here

      }

    if( LOG.isDebugEnabled() )
      LOG.debug( "preparing match within: {}", this.getClass().getSimpleName() );

    ElementGraph prepared = prepareForMatch( transformed, graph );

    if( LOG.isDebugEnabled() )
      LOG.debug( "completed match within: {}, with result: {}", this.getClass().getSimpleName(), prepared != null );

    if( prepared == null )
View Full Code Here

    if( isDisabled() )
      return;

    for( int i = 0; i < flowElementGraphs.size(); i++ )
      {
      ElementGraph flowElementGraph = flowElementGraphs.get( i );
      String name = String.format( "%02d-%s-%s-%04d.dot", phase.ordinal(), phase, subName, i );

      File file = new File( getTracePath(), name );

      LOG.info( "writing phase step trace: {}, to: {}", name, file );

      flowElementGraph.writeDOT( file.toString() );
      }
    }
View Full Code Here

        if( pipelineGraphs == null )
          continue;

        for( int i = 0; i < pipelineGraphs.size(); i++ )
          {
          ElementGraph flowElementGraph = pipelineGraphs.get( i );
          String name = String.format( "%02d-%s-%s-%04d-%04d-%04d.dot", phase.ordinal(), phase, subName, stepCount, nodeCount, i );

          File file = new File( getTracePath(), name );

          LOG.info( "writing phase node pipeline trace: {}, to: {}", name, file );

          flowElementGraph.writeDOT( file.toString() );
          }

        nodeCount++;
        }
View Full Code Here

      {
      List<? extends ElementGraph> flowElementGraphs = entry.getValue();

      for( int i = 0; i < flowElementGraphs.size(); i++ )
        {
        ElementGraph flowElementGraph = flowElementGraphs.get( i );
        String name = String.format( "%02d-%s-%s-%04d-%04d.dot", phase.ordinal(), phase, subName, stepCount, i );

        File file = new File( getTracePath(), name );

        LOG.info( "writing phase node trace: {}, to: {}", name, file );

        flowElementGraph.writeDOT( file.toString() );
        }

      stepCount++;
      }
    }
View Full Code Here

    SubGraphIterator stepIterator = wrapIterator( expressionIterator );

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

      annotatedSubGraphs.put( next, annotationMap );
      }
View Full Code Here

    }

  @Override
  public ElementGraph next()
    {
    ElementGraph next = parentIterator.next();

    if( hasNext() )
      {
      maskedElements.addAll( next.vertexSet() );
      maskedScopes.addAll( next.edgeSet() ); // catches case with no elements on path

      return next;
      }

    maskedElements.removeAll( next.vertexSet() );
    maskedScopes.removeAll( next.edgeSet() );

    return new ElementMaskSubGraph( parentIterator.getElementGraph(), maskedElements, maskedScopes );
    }
View Full Code Here

    try
      {
      if( !hasNext() )
        throw new NoSuchElementException();

      ElementGraph contractedMatchedGraph = match.getMatchedGraph();

      Set<FlowElement> excludes = new HashSet<>( getContractedGraph().vertexSet() );

      excludes.removeAll( contractedMatchedGraph.vertexSet() );

      return asSubGraph( elementGraph, contractedMatchedGraph, excludes );
      }
    finally
      {
View Full Code Here

TOP

Related Classes of cascading.flow.planner.graph.ElementGraph

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.