org.apache.tez.dag.api.Vertex.addDataSink()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.apache.tez.dag.api.Vertex.addDataSink()方法的一些代码示例,展示了Vertex.addDataSink()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.addDataSink()方法的具体详情如下:
包路径:org.apache.tez.dag.api.Vertex
类名称:Vertex
方法名:addDataSink

Vertex.addDataSink介绍

[英]Specifies an external data sink for a Vertex. This is meant to be used when a Vertex writes Output directly to an external destination.

If an output of the vertex is meant to be consumed by another Vertex in the DAG - use the DAG method. If a vertex needs generate data to an external source as well as for another Vertex in the DAG, a combination of this API and the DAG.addEdge API can be used.
[中]指定顶点的外部数据接收器。这意味着当顶点将输出直接写入外部目标时使用。
如果顶点的输出将被DAG中的另一个顶点使用,请使用DAG方法。如果一个顶点需要为外部源以及DAG中的另一个顶点生成数据,则使用此API和DAG的组合。可以使用addEdge API。

代码示例

代码示例来源:origin: apache/hive

v.addDataSink("out_"+work.getName(), new DataSinkDescriptor(
  OutputDescriptor.create(MROutput.class.getName())
  .setUserPayload(TezUtils.createUserPayloadFromConf(conf)), null, null));

代码示例来源:origin: apache/drill

v.addDataSink("out_"+work.getName(), new DataSinkDescriptor(
  OutputDescriptor.create(MROutput.class.getName())
  .setUserPayload(TezUtils.createUserPayloadFromConf(conf)), null, null));

代码示例来源:origin: org.apache.tez/tez-examples

private DAG createDag(TezConfiguration tezConf, Path largeOutPath, Path smallOutPath,
  Path expectedOutputPath, int numTasks, long largeOutSize, long smallOutSize)
  throws IOException {
 long largeOutSizePerTask = largeOutSize / numTasks;
 long smallOutSizePerTask = smallOutSize / numTasks;
 DAG dag = DAG.create("JoinDataGen");
 Vertex genDataVertex = Vertex.create("datagen", ProcessorDescriptor.create(
   GenDataProcessor.class.getName()).setUserPayload(
   UserPayload.create(ByteBuffer.wrap(GenDataProcessor.createConfiguration(largeOutSizePerTask,
     smallOutSizePerTask)))), numTasks);
 genDataVertex.addDataSink(STREAM_OUTPUT_NAME, 
   MROutput.createConfigBuilder(new Configuration(tezConf),
     TextOutputFormat.class, largeOutPath.toUri().toString()).build());
 genDataVertex.addDataSink(HASH_OUTPUT_NAME, 
   MROutput.createConfigBuilder(new Configuration(tezConf),
     TextOutputFormat.class, smallOutPath.toUri().toString()).build());
 genDataVertex.addDataSink(EXPECTED_OUTPUT_NAME, 
   MROutput.createConfigBuilder(new Configuration(tezConf),
     TextOutputFormat.class, expectedOutputPath.toUri().toString()).build());
 dag.addVertex(genDataVertex);
 return dag;
}

代码示例来源:origin: org.apache.tez/tez-tests

MRHelpers.getResourceForMRReducer(finalReduceConf));
 finalReduceVertex.addTaskLocalFiles(commonLocalResources)
   .addDataSink("MROutput", MROutputLegacy.createConfigBuilder(
     finalReduceConf, NullOutputFormat.class).build())
   .setTaskLaunchCmdOpts(MRHelpers.getJavaOptsForMRReducer(finalReduceConf))
} else {
 mapVertex.addDataSink("MROutput",
   MROutputLegacy.createConfigBuilder(mapStageConf, NullOutputFormat.class).build());

代码示例来源:origin: org.apache.tez/tez-tests

outputConf.set(FileOutputFormat.OUTDIR, outputPath);
DataSinkDescriptor od = MROutput.createConfigBuilder(outputConf, null).build();
checkerVertex.addDataSink("union", od);
DataSinkDescriptor od2 = MROutput.createConfigBuilder(allPartsConf,
  TextOutputFormat.class, outputPath + "-all-parts").build();
checkerVertex.addDataSink("all-parts", od2);

代码示例来源:origin: org.apache.tez/tez-tests

v3.addDataSink(OUTPUT, dataSinkDescriptor);
v3.setVertexManagerPlugin(
 VertexManagerPluginDescriptor.create(CartesianProductVertexManager.class.getName())

代码示例来源:origin: cwensel/cascading

vertex.addDataSink( FlowElements.id( flowElement ), dataSinkDescriptor );

代码示例来源:origin: cascading/cascading-hadoop2-tez

vertex.addDataSink( FlowElements.id( flowElement ), dataSinkDescriptor );

代码示例来源:origin: org.apache.tez/tez-tests

DataSinkDescriptor sink = MROutput.createConfigBuilder(
  new Configuration(tezConf), TextOutputFormat.class, v1OutputPathPrefix + "_" + i).build();
v1.addDataSink(V1OutputNamePrefix + "_" + i, sink);
DataSinkDescriptor sink = MROutput.createConfigBuilder(
  new Configuration(tezConf), TextOutputFormat.class, v2OutputPathPrefix + "_" + i).build();
v2.addDataSink(V2OutputNamePrefix + "_" + i, sink);
DataSinkDescriptor sink = MROutput.createConfigBuilder(
  new Configuration(tezConf), TextOutputFormat.class, v3OutputPathPrefix + "_" + i).build();
v3.addDataSink(V3OutputNamePrefix + "_" + i, sink);

代码示例来源:origin: org.apache.tez/tez-tests

stage2Vertex.addDataSink(
  "MROutput",
  DataSinkDescriptor.create(OutputDescriptor.create(MROutput.class.getName())

代码示例来源:origin: org.apache.tez/tez-examples

sorterVertex.addDataSink(OUTPUT, dataSink);

代码示例来源:origin: org.apache.tez/tez-examples

.addDataSink(OUTPUT, dataSink);

代码示例来源:origin: org.apache.tez/tez-tests

OutputCommitterDescriptor ocd =
  OutputCommitterDescriptor.create(MROutputCommitter.class.getName());
stage2Vertex.addDataSink("MROutput", DataSinkDescriptor.create(od, ocd, null));

代码示例来源:origin: org.apache.tez/tez-examples

v4.addDataSink(OUTPUT,
 MROutput.createConfigBuilder(new Configuration(tezConf), TextOutputFormat.class, outputPath)
     .build());

代码示例来源:origin: org.apache.tez/tez-mapreduce

od.setHistoryText(TezUtils.convertToHistoryText(stageConf));
vertex.addDataSink("MROutput", DataSinkDescriptor.create(od,
  OutputCommitterDescriptor.create(MROutputCommitter.class.getName()), null));

代码示例来源:origin: org.apache.tez/tez-examples

Vertex.create(joiner,
  ProcessorDescriptor.create(HashJoinProcessor.class.getName()),
  numPartitions).addDataSink(
  joinOutput,
  MROutput.createConfigBuilder(new Configuration(tezConf),

代码示例来源:origin: org.apache.tez/tez-tests

finalReduceVertex.addDataSink("MROutput",
  MROutputLegacy.createConfigBuilder(finalReduceConf, TextOutputFormat.class, outputPath)
    .build());

代码示例来源:origin: org.apache.tez/tez-examples

ShuffleVertexManager.createConfigBuilder(tezConf).setAutoReduceParallelism(true)
    .build())
.addDataSink(
  joinOutput,
  MROutput.createConfigBuilder(new Configuration(tezConf), TextOutputFormat.class,

代码示例来源:origin: org.apache.pig/pig

vertex.addDataSink(outputKey.toString(),
    DataSinkDescriptor.create(storeOutDescriptor,
    OutputCommitterDescriptor.create(MROutputCommitter.class.getName()),

代码示例来源:origin: com.facebook.presto.hive/hive-apache

v.addDataSink("out_"+work.getName(), new DataSinkDescriptor(
  OutputDescriptor.create(MROutput.class.getName())
  .setUserPayload(TezUtils.createUserPayloadFromConf(conf)), null, null));

相关文章