Package cascading.flow.planner.graph

Examples of cascading.flow.planner.graph.FlowElementGraph


    ruleRegistry.addRule( new RuleInsertionTransformer( PlanPhase.PreResolveAssembly, new TestCheckpointExpression(), IntermediateTapElementFactory.TEMP_TAP ) );
//    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(),
View Full Code Here


    PlannerContext plannerContext = new PlannerContext( ruleRegistry );

    ruleRegistry.addRule( new RemoveNoOpPipeTransformer() );

    FlowElementGraph elementGraph = new HashJoinMergeIntoHashJoinStreamedStreamedMergeGraph();
//    FlowElementGraph elementGraph = new HashJoinAroundHashJoinLeftMostGraph();
    RuleResult ruleResult = new RuleExec( ruleRegistry ).executeRulePhase( PlanPhase.PreResolveAssembly, plannerContext, new RuleResult( elementGraph ) );
    FlowElementGraph flowElementGraph = ruleResult.getAssemblyGraph();

    flowElementGraph.writeDOT( getPlanPath() + "/mergejoin.dot" );

    ContractedTransformer transformer = new ContractedTransformer( new TestNoGroupTapExpressionGraph() );

    Transformed<ElementGraph> transformed = transformer.transform( plannerContext, flowElementGraph );
View Full Code Here

          new TestBoundarySelJoinCoGroupExpressionGraph()
        )
      )
    );

    FlowElementGraph elementGraph = new SelfCoGroupGraph();
    RuleExec ruleExec = new RuleExec( ruleRegistry );

    ruleExec.enableTransformTracing( getPlanPath() );

    PlannerContext plannerContext = new PlannerContext( ruleRegistry );
View Full Code Here

    PlannerContext plannerContext = new PlannerContext( ruleRegistry );

    ruleRegistry.addRule( new RemoveNoOpPipeTransformer() );

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

    flowElementGraph.writeDOT( getPlanPath() + "/node.dot" );

    ExpressionSubGraphIterator iterator = new ExpressionSubGraphIterator(
      new PlannerContext(),
      new TestNoGroupTapExpressionGraph(),
      new TestConsecutiveTapsExpressionGraph(),
View Full Code Here

    {
    presentSourceFields( pipeGraph );

    presentSinkFields( pipeGraph );

    return new FlowElementGraph( pipeGraph );
    }
View Full Code Here

    this.defaultDebugLevel = getDebugLevel( properties );
    }

  public F buildFlow( FlowDef flowDef, RuleRegistry ruleRegistry )
    {
    FlowElementGraph flowElementGraph = null;

    try
      {
      verifyAllTaps( flowDef );

      F flow = createFlow( flowDef );
      String nameOrID = getNameOrID( flow );
      String transformPath = getPlanTransformTracePath();

      if( transformPath != null )
        transformPath = FileSystems.getDefault().getPath( transformPath, nameOrID ).toString();

      Pipe[] tails = resolveTails( flowDef, flow );

      verifyAssembly( flowDef, tails );

      configRuleRegistryDefaults( ruleRegistry );

      RuleExec ruleExec = new RuleExec( ruleRegistry );

      flowElementGraph = createFlowElementGraph( flowDef, tails );

      writeTracePlan( nameOrID, "0-initial-flow-element-graph", flowElementGraph );

      ruleExec.enableTransformTracing( transformPath );

      PlannerContext plannerContext = new PlannerContext( ruleRegistry, this, flowDef, flow, transformPath != null );

      RuleResult ruleResult = ruleExec.exec( plannerContext, flowElementGraph );

      LOG.info( "executed rule registry: {}, completed in: {}", ruleRegistry.getName(), formatDurationFromMillis( ruleResult.getDuration() ) );

      writeTracePlan( nameOrID, "1-completed-flow-element-graph", ruleResult.getAssemblyGraph() );

      writeStats( plannerContext, nameOrID, ruleResult );

      verifyResult( ruleResult );

      FlowElementGraph finalFlowElementGraph = ruleResult.getAssemblyGraph();
      Map<ElementGraph, List<? extends ElementGraph>> stepToNodes = ruleResult.getStepToNodeGraphMap();
      Map<ElementGraph, List<? extends ElementGraph>> nodeToPipeline = ruleResult.getNodeToPipelineGraphMap();

      FlowStepGraph flowStepGraph = new FlowStepGraph( transformPath, this, finalFlowElementGraph, stepToNodes, nodeToPipeline );
View Full Code Here

      {
      switch( processLevel )
        {
        case Assembly:

          FlowElementGraph finalFlowElementGraph = ruleResult.getAssemblyGraph();

          if( finalFlowElementGraph.vertexSet().isEmpty() )
            throw new PlannerException( "final assembly graph is empty: " + ruleResult.getRegistry().getName() );

          break;

        case Step:
View Full Code Here

    Map<String, Tap> traps = flowDef.getTrapsCopy();
    Map<String, Tap> checkpoints = flowDef.getCheckpointsCopy();

    checkpointTapRootPath = makeCheckpointRootPath( flowDef );

    return new FlowElementGraph( getPlatformInfo(), flowTails, sources, sinks, traps, checkpoints, checkpointTapRootPath != null );
    }
View Full Code Here

  private void resolveElements( PlannerContext plannerContext, RuleResult ruleResult )
    {
    if( !registry.enabledResolveElements() )
      return;

    FlowElementGraph elementGraph = ruleResult.getAssemblyGraph();

    elementGraph = (FlowElementGraph) elementGraph.copyGraph();

    elementGraph.resolveFields();
    ( (BaseFlow) plannerContext.getFlow() ).updateSchemes( elementGraph );

    elementGraph = new FlowElementGraph( elementGraph ); // forces a re-hash in graph

    ruleResult.setLevelResults( ProcessLevel.Assembly, ruleResult.initialAssembly, elementGraph );
    }
View Full Code Here

TOP

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

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.