abstractdog commented on code in PR #6659:
URL: https://github.com/apache/hive/pull/6659#discussion_r3680676973
##########
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskSchedulerService.java:
##########
@@ -470,15 +472,15 @@ public LlapTaskSchedulerService(TaskSchedulerContext
taskSchedulerContext, Clock
this.workloadManagementEnabled =
!StringUtils.isEmpty(conf.get(ConfVars.HIVE_SERVER2_TEZ_INTERACTIVE_QUEUE.varname,
"").trim());
+ ApplicationAttemptId appAttemptId = getContext().getApplicationAttemptId();
synchronized (LlapTaskCommunicator.pluginInitLock) {
- LlapTaskCommunicator peer = LlapTaskCommunicator.instance;
+ LlapTaskCommunicator peer =
LlapTaskCommunicator.pendingCommunicators.remove(appAttemptId);
if (peer != null) {
- // We are the last to initialize.
+ // We are the last to initialize for this DAG.
this.setTaskCommunicator(peer);
peer.setScheduler(this);
- LlapTaskCommunicator.instance = null;
} else {
- instance = this;
+ pendingSchedulers.put(appAttemptId, this);
}
Review Comment:
this makes sense to me
need to be aware that in production, we'll always have a single instance per
AM, but taking care of removing the instances in the shutdown() method makes
sense to me
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]