本文整理了Java中org.apache.tez.dag.api.Vertex.getName()
方法的一些代码示例,展示了Vertex.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.getName()
方法的具体详情如下:
包路径:org.apache.tez.dag.api.Vertex
类名称:Vertex
方法名:getName
[英]Get the vertex name
[中]获取顶点名称
代码示例来源:origin: apache/hive
private long hiveInputRecordsFromOtherVertices(String vertexName) {
List<Vertex> inputVerticesList = dag.getVertex(vertexName).getInputVertices();
long result = 0;
for (Vertex inputVertex : inputVerticesList) {
long inputVertexRecords = hiveInputRecordsFromTezCounters(vertexName, inputVertex.getName());
if (inputVertexRecords < 0) {
inputVertexRecords = hiveInputRecordsFromHiveCounters(inputVertex.getName());
}
result += inputVertexRecords;
}
return result;
}
代码示例来源:origin: apache/drill
private long hiveInputRecordsFromOtherVertices(String vertexName) {
List<Vertex> inputVerticesList = dag.getVertex(vertexName).getInputVertices();
long result = 0;
for (Vertex inputVertex : inputVerticesList) {
long inputVertexRecords = hiveInputRecordsFromTezCounters(vertexName, inputVertex.getName());
if (inputVertexRecords < 0) {
inputVertexRecords = hiveInputRecordsFromHiveCounters(inputVertex.getName());
}
result += inputVertexRecords;
}
return result;
}
代码示例来源:origin: apache/hive
Vertex wx = utils.createVertex(wxConf, mapWork, scratchDir, fs, ctx, false, work,
work.getVertexType(mapWork), DagUtils.createTezLrMap(appJarLr, null));
String vertexName = wx.getName();
dag.addVertex(wx);
utils.addCredentials(mapWork, dag);
代码示例来源:origin: apache/drill
new ArrayList<LocalResource>(), fs, ctx, false, work,
work.getVertexType(mapWork));
String vertexName = wx.getName();
dag.addVertex(wx);
utils.addCredentials(mapWork, dag);
代码示例来源:origin: apache/hive
LOG.info("Creating Edge between " + group.getGroupName() + " and " + w.getName());
代码示例来源:origin: apache/drill
LOG.info("Creating Edge between " + group.getGroupName() + " and " + w.getName());
代码示例来源:origin: apache/hive
@Test
public void testBuildDag() throws IllegalArgumentException, IOException, Exception {
DAG dag = task.build(conf, work, path, new Context(conf),
DagUtils.createTezLrMap(appLr, null));
for (BaseWork w: work.getAllWork()) {
Vertex v = dag.getVertex(w.getName());
assertNotNull(v);
List<Vertex> outs = v.getOutputVertices();
for (BaseWork x: work.getChildren(w)) {
boolean found = false;
for (Vertex u: outs) {
if (u.getName().equals(x.getName())) {
found = true;
break;
}
}
assertTrue(found);
}
}
}
代码示例来源:origin: org.apache.tez/tez-api
void addGroupInput(String groupName, GroupInfo groupInputInfo) {
if (groupInputs.put(groupName, groupInputInfo) != null) {
throw new IllegalStateException(
"Vertex: " + getName() +
" already has group input with name:" + groupName);
}
}
代码示例来源:origin: org.apache.tez/tez-api
public synchronized DAG addVertex(Vertex vertex) {
if (vertices.containsKey(vertex.getName())) {
throw new IllegalStateException(
"Vertex " + vertex.getName() + " already defined!");
}
vertices.put(vertex.getName(), vertex);
return this;
}
代码示例来源:origin: org.apache.tez/tez-api
/**
* Set the files etc that must be provided to the tasks of this vertex
* @param localFiles
* files that must be available locally for each task. These files
* may be regular files, archives etc. as specified by the value
* elements of the map.
* @return this Vertex
*/
public Vertex addTaskLocalFiles(Map<String, LocalResource> localFiles) {
if (localFiles != null) {
TezCommonUtils.addAdditionalLocalResources(localFiles, taskLocalResources, "Vertex " + getName());
}
return this;
}
代码示例来源:origin: org.apache.tez/tez-api
void addOutputVertex(Vertex outputVertex, GroupInputEdge edge) {
this.groupInfo.edgeMergedInputs.put(outputVertex.getName(), edge.getMergedInput());
}
代码示例来源:origin: org.apache.pig/pig
/**
* Set config with Scope.Vertex in TezConfiguration on the vertex
*
* @param vertex Vertex on which config is to be set
* @param isMapVertex Whether map or reduce vertex. i.e root or intermediate/leaf vertex
* @param conf Config that contains the tez or equivalent mapreduce settings.
*/
public static void setVertexConfig(Vertex vertex, boolean isMapVertex,
Configuration conf) {
Map<String, String> configMapping = isMapVertex ? mrMapParamToTezVertexParamMap
: mrReduceParamToTezVertexParamMap;
for (Entry<String, String> dep : configMapping.entrySet()) {
String value = conf.get(dep.getValue(), conf.get(dep.getKey()));
if (value != null) {
vertex.setConf(dep.getValue(), value);
LOG.debug("Setting " + dep.getValue() + " to " + value
+ " for the vertex " + vertex.getName());
}
}
}
代码示例来源:origin: org.apache.tez/tez-api
if (edges != null) {
for (Edge e : edgeMap.get(av.v)) {
AnnotatedVertex outVertex = vertexMap.get(e.getOutputVertex().getName());
if (outVertex.index == -1) {
strongConnect(outVertex, vertexMap, edgeMap, stack, nextIndex, topologicalVertexStack);
message.append(av.v.getName()).append(" <- ");
for (; pop != av; pop = stack.pop()) {
message.append(pop.v.getName()).append(" <- ");
pop.onstack = false;
message.append(av.v.getName());
throw new IllegalStateException("DAG contains a cycle: " + message);
} else {
for (Edge edge : edgeMap.get(pop.v)) {
if (edge.getOutputVertex().equals(pop.v)) {
throw new IllegalStateException("DAG contains a self-cycle on vertex:" + pop.v.getName());
topologicalVertexStack.push(av.v.getName());
代码示例来源:origin: org.apache.pig/pig
splitFileStatus.getModificationTime());
for (Vertex vertex : dag.getVertices()) {
if (!inputSplitInDiskVertices.contains(vertex.getName())) {
if (vertex.getTaskLocalFiles().containsKey(
MRJobConfig.JOB_SPLIT)) {
代码示例来源:origin: org.apache.tez/tez-api
resourceName
+ ") between dag local resource and vertex " +
v.getName() + " local resource. "
+ "\nResource of dag : " +
commonTaskLocalFiles.get(resourceName)
resourceName
+ ") between dag local resource and vertex " +
v.getName() + " local resource. "
+ "\nResource of dag : " +
commonTaskLocalFiles.get(resourceName)
"Failed while attempting to validate sha for conflicting resources (" +
resourceName
+ ") between dag local resource and vertex " + v.getName() +
" local resource. "
+ "\nResource of dag : " +
代码示例来源:origin: org.apache.pig/pig
public boolean notifyFinishedOrFailed() {
DAGStatus dagStatus = runningJob.getDAGStatus();
if (dagStatus == null) {
return false;
}
if (dagStatus.getState() == DAGStatus.State.SUCCEEDED) {
Map<Enum, Long> warningAggMap = new HashMap<Enum, Long>();
DAG dag = runningJob.getDAG();
for (Vertex v : dag.getVertices()) {
TezVertexStats tts = tezStats.getVertexStats(dag.getName(), v.getName());
if (tts == null) {
continue; //vertex groups
}
Map<String, Map<String, Long>> counterGroups = tts.getCounters();
if (counterGroups == null) {
log.warn("Counters are not available for vertex " + v.getName() + ". Not computing warning aggregates.");
} else {
computeWarningAggregate(counterGroups, warningAggMap);
}
}
if (aggregateWarning) {
CompilationMessageCollector.logAggregate(warningAggMap, MessageType.Warning, log);
}
return true;
}
return false;
}
}
代码示例来源:origin: cwensel/cascading
LOG.info( "adding {} edge between: {} and {}", type, Util.join( sourceVerticesIDs, "," ), targetVertex.getName() );
dag.addEdge( GroupInputEdge.create( vertexGroup, targetVertex, edgeProperty, inputDescriptor ) );
代码示例来源:origin: cascading/cascading-hadoop2-tez
LOG.info( "adding {} edge between: {} and {}", type, Util.join( sourceVerticesIDs, "," ), targetVertex.getName() );
dag.addEdge( GroupInputEdge.create( vertexGroup, targetVertex, edgeProperty, inputDescriptor ) );
代码示例来源:origin: org.apache.tez/tez-mapreduce
+ vertex.getName() + ", processor="
+ vertex.getProcessorDescriptor().getClassName() + ", parallelism="
+ vertex.getParallelism() + ", javaOpts=" + vertex.getTaskLaunchCmdOpts()
代码示例来源:origin: com.facebook.presto.hive/hive-apache
LOG.info("Creating Edge between " + group.getGroupName() + " and " + w.getName());
内容来源于网络,如有侵权,请联系作者删除!