abstractdog commented on code in PR #361:
URL: https://github.com/apache/tez/pull/361#discussion_r1894896068
##########
tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java:
##########
@@ -2817,6 +2817,18 @@ private VertexState setupVertex() {
return VertexState.INITED;
}
+ private boolean canSkipInitializingParents() {
+ // Both cases use RootInputVertexManager. RootInputVertexManager can start
tasks even though
+ // any parents are not fully initialized.
+ if (vertexPlan.hasVertexManagerPlugin()) {
+ final VertexManagerPluginDescriptor pluginDesc = DagTypeConverters
+
.convertVertexManagerPluginDescriptorFromDAGPlan(vertexPlan.getVertexManagerPlugin());
+ return
pluginDesc.getClassName().equals(RootInputVertexManager.class.getName());
+ } else {
+ return inputsWithInitializers != null;
Review Comment:
okay, that makes sense, are you fine with further refactoring and reusing
the conditions where possible? something like below:
```
private boolean isRootInputVertexManagerUsed() {
return isRootInputVertexManagerPluginUsed() || hasInputInitializers();
}
private boolean isRootInputVertexManagerPluginUsed(){
return vertexPlan.hasVertexManagerPlugin() && DagTypeConverters
.convertVertexManagerPluginDescriptorFromDAGPlan(vertexPlan.getVertexManagerPlugin()).getClassName().equals(RootInputVertexManager.class.getName());
}
private boolean hasInputInitializers(){
return inputsWithInitializers != null;
}
```
hasInputInitializers might be used in 2 places for cross reference
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]