本文整理汇总了Java中org.apache.tez.dag.api.EdgeProperty.DataMovementType.BROADCAST属性的典型用法代码示例。如果您正苦于以下问题:Java DataMovementType.BROADCAST属性的具体用法?Java DataMovementType.BROADCAST怎么用?Java DataMovementType.BROADCAST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.tez.dag.api.EdgeProperty.DataMovementType
的用法示例。
在下文中一共展示了DataMovementType.BROADCAST属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testVerifyBroadcast
@Test(timeout = 5000)
public void testVerifyBroadcast() {
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.BROADCAST,
DataSourceType.PERSISTED, SchedulingType.SEQUENTIAL,
new OutputDescriptor(dummyOutputClassName),
new InputDescriptor(dummyInputClassName)));
DAG dag = new DAG("testDag");
dag.addVertex(v1);
dag.addVertex(v2);
dag.addEdge(e1);
dag.verify();
}
示例2: configureValueOnlyTupleOutput
static public void configureValueOnlyTupleOutput(TezEdgeDescriptor edge, DataMovementType dataMovementType) {
edge.dataMovementType = dataMovementType;
if (dataMovementType == DataMovementType.BROADCAST || dataMovementType == DataMovementType.ONE_TO_ONE) {
edge.outputClassName = UnorderedKVOutput.class.getName();
edge.inputClassName = UnorderedKVInput.class.getName();
} else if (dataMovementType == DataMovementType.SCATTER_GATHER) {
edge.outputClassName = UnorderedPartitionedKVOutput.class.getName();
edge.inputClassName = UnorderedKVInput.class.getName();
edge.partitionerClass = RoundRobinPartitioner.class;
}
edge.setIntermediateOutputKeyClass(POValueOutputTez.EmptyWritable.class.getName());
edge.setIntermediateOutputValueClass(TUPLE_CLASS);
}
示例3: convertFromDAGPlan
public static DataMovementType convertFromDAGPlan(PlanEdgeDataMovementType type){
switch(type){
case ONE_TO_ONE : return DataMovementType.ONE_TO_ONE;
case BROADCAST : return DataMovementType.BROADCAST;
case SCATTER_GATHER : return DataMovementType.SCATTER_GATHER;
default : throw new IllegalArgumentException("unknown 'dataMovementType': " + type);
}
}
示例4: convertFromDAGPlan
public static DataMovementType convertFromDAGPlan(PlanEdgeDataMovementType type){
switch(type){
case ONE_TO_ONE : return DataMovementType.ONE_TO_ONE;
case BROADCAST : return DataMovementType.BROADCAST;
case SCATTER_GATHER : return DataMovementType.SCATTER_GATHER;
case CUSTOM : return DataMovementType.CUSTOM;
default : throw new IllegalArgumentException("unknown 'dataMovementType': " + type);
}
}