zhengchenyu commented on code in PR #236:
URL: https://github.com/apache/tez/pull/236#discussion_r950044288


##########
tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java:
##########
@@ -910,7 +910,8 @@ public void reportError(int taskSchedulerIndex, 
ServicePluginError servicePlugin
       LOG.info("Error reported by scheduler {} - {}",
           Utils.getTaskSchedulerIdentifierString(taskSchedulerIndex, 
appContext) + ": " +
               diagnostics);
-      if 
(taskSchedulerDescriptors[taskSchedulerIndex].getClassName().equals(yarnSchedulerClassName))
 {
+      if (taskSchedulerDescriptors[taskSchedulerIndex].getEntityName()

Review Comment:
   Yes, this is the only actual fix.
   
   * Before this PR
   
   | method | return value |
   | --- | ---|
   | taskSchedulerDescriptors[taskSchedulerIndex].getClassName() | null |
   | yarnSchedulerClassName | 
"org.apache.tez.dag.app.rm.YarnTaskSchedulerService" |
   
   taskSchedulerDescriptors[taskSchedulerIndex].getClassName() is set from the 
variable 'taskSchedulerDescriptors' of  DAGAppMaster::serviceInit. In 
DAGAppMaster::parsePlugin, when we construct NamedEntityDescriptor for tez yarn 
plugin, the className is all null.
   
   yarnSchedulerClassName is set from tez.am.yarn.scheduler.class, default 
value is "org.apache.tez.dag.app.rm.YarnTaskSchedulerService".
   
   So for tez yarn plugin, 
taskSchedulerDescriptors[taskSchedulerIndex].getClassName() will never equals 
to yarnSchedulerClassName. Then 
   
   * After this PR
   
   ```
   taskSchedulerDescriptors[taskSchedulerIndex].getEntityName() will return 
"TezYarn"
   ```
   



-- 
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]

Reply via email to