Package cascading.flow.iso.graph

Examples of cascading.flow.iso.graph.StandardElementGraph


  {

  @Test
  public void testElementGraphs()
    {
    assertEquals( 5, ElementGraphs.findAllGroups( new StandardElementGraph() ).size() );
    assertEquals( 3, ElementGraphs.findSources( new StandardElementGraph() ).size() );
    assertEquals( 2, ElementGraphs.findSinks( new StandardElementGraph() ).size() );
    }
View Full Code Here


    }

  @Test
  public void testRemoveBranch()
    {
    StandardElementGraph standardElementGraph = new StandardElementGraph();

    standardElementGraph.writeDOT( getPlanPath() + "/standard-before.dot" );

    Pipe pipe = ElementGraphs.findFirstPipeNamed( standardElementGraph, "remove" );

    int size = standardElementGraph.vertexSet().size();
    ElementGraphs.removeBranchContaining( standardElementGraph, pipe );

    standardElementGraph.writeDOT( getPlanPath() + "/standard-after.dot" );

    assertEquals( size - 3, standardElementGraph.vertexSet().size() );
    }
View Full Code Here

    }

  @Test
  public void testRemoveBetweenBranchInclusive()
    {
    StandardElementGraph standardElementGraph = new StandardElementGraph( true );

    standardElementGraph.writeDOT( getPlanPath() + "/standard-before.dot" );

    Pipe before = ElementGraphs.findFirstPipeNamed( standardElementGraph, "before" );
    Pipe after = ElementGraphs.findLastPipeNamed( standardElementGraph, "after" );

    int size = standardElementGraph.vertexSet().size();
    ElementGraphs.removeBranchBetween( standardElementGraph, before, after, true );

    standardElementGraph.writeDOT( getPlanPath() + "/standard-after.dot" );

    assertEquals( size - 7, standardElementGraph.vertexSet().size() );
    }
View Full Code Here

    }

  @Test
  public void testRemoveBetweenBranchExclusive()
    {
    StandardElementGraph standardElementGraph = new StandardElementGraph( true );

    standardElementGraph.writeDOT( getPlanPath() + "/standard-before.dot" );

    Pipe before = ElementGraphs.findFirstPipeNamed( standardElementGraph, "last*upper2" );
    Pipe after = ElementGraphs.findFirstPipeNamed( standardElementGraph, "after*last" );

    int size = standardElementGraph.vertexSet().size();
    ElementGraphs.removeBranchBetween( standardElementGraph, before, after, false );

    standardElementGraph.writeDOT( getPlanPath() + "/standard-after.dot" );

    assertEquals( size - 7, standardElementGraph.vertexSet().size() );
    }
View Full Code Here

    PlannerContext plannerContext = new PlannerContext( ruleRegistry, null, null, null, true );

    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(),
View Full Code Here

    }

  @Test
  public void testStandardIsoTransform()
    {
    transform( new StandardElementGraph(), new TestGroupGroupExpression() );
    }
View Full Code Here

TOP

Related Classes of cascading.flow.iso.graph.StandardElementGraph

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.