Java Code Examples for org.apache.tez.dag.api.EdgeProperty.DataSourceType#EPHEMERAL

The following examples show how to use org.apache.tez.dag.api.EdgeProperty.DataSourceType#EPHEMERAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestDAGVerify.java    From incubator-tez with Apache License 2.0 6 votes vote down vote up
@Test(expected = IllegalStateException.class, timeout = 5000)  
public void testVerify3() {
  Vertex v1 = new Vertex("v1",
      new ProcessorDescriptor(dummyProcessorClassName),
      dummyTaskCount, dummyTaskResource);
  Vertex v2 = new Vertex("v2",
      new ProcessorDescriptor("MapProcessor"),
      dummyTaskCount, dummyTaskResource);
  Edge e1 = new Edge(v1, v2,
      new EdgeProperty(DataMovementType.SCATTER_GATHER, 
          DataSourceType.EPHEMERAL, SchedulingType.SEQUENTIAL, 
          new OutputDescriptor(dummyOutputClassName),
          new InputDescriptor(dummyInputClassName)));
  DAG dag = new DAG("testDag");
  dag.addVertex(v1);
  dag.addVertex(v2);
  dag.addEdge(e1);
  dag.verify();
}
 
Example 2
Source File: TestDAGVerify.java    From incubator-tez with Apache License 2.0 6 votes vote down vote up
@Test(expected = IllegalStateException.class, timeout = 5000)  
public void testVerify4() {
  Vertex v1 = new Vertex("v1",
      new ProcessorDescriptor(dummyProcessorClassName),
      dummyTaskCount, dummyTaskResource);
  Vertex v2 = new Vertex("v2",
      new ProcessorDescriptor("MapProcessor"),
      dummyTaskCount, dummyTaskResource);
  Edge e1 = new Edge(v1, v2,
      new EdgeProperty(DataMovementType.SCATTER_GATHER, 
          DataSourceType.EPHEMERAL, SchedulingType.CONCURRENT, 
          new OutputDescriptor(dummyOutputClassName),
          new InputDescriptor(dummyInputClassName)));
  DAG dag = new DAG("testDag");
  dag.addVertex(v1);
  dag.addVertex(v2);
  dag.addEdge(e1);
  dag.verify();
}
 
Example 3
Source File: DagTypeConverters.java    From incubator-tez with Apache License 2.0 5 votes vote down vote up
public static DataSourceType convertFromDAGPlan(PlanEdgeDataSourceType sourceType){
  switch(sourceType){
    case PERSISTED : return DataSourceType.PERSISTED;
    case PERSISTED_RELIABLE : return DataSourceType.PERSISTED_RELIABLE;
    case EPHEMERAL :  return DataSourceType.EPHEMERAL;
    default : throw new RuntimeException("unknown 'dataSourceType': " + sourceType);
  }
}
 
Example 4
Source File: DagTypeConverters.java    From tez with Apache License 2.0 5 votes vote down vote up
public static DataSourceType convertFromDAGPlan(PlanEdgeDataSourceType sourceType){
  switch(sourceType){
    case PERSISTED : return DataSourceType.PERSISTED;
    case PERSISTED_RELIABLE : return DataSourceType.PERSISTED_RELIABLE;
    case EPHEMERAL :  return DataSourceType.EPHEMERAL;
    default : throw new RuntimeException("unknown 'dataSourceType': " + sourceType);
  }
}