illiabarbashov-sketch commented on code in PR #6659:
URL: https://github.com/apache/hive/pull/6659#discussion_r3720654740


##########
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java:
##########
@@ -158,15 +169,15 @@ public LlapTaskCommunicator(
 
     credentialMap = new ConcurrentHashMap<>();
     sourceStateTracker = new SourceStateTracker(getContext(), this);
+    this.appAttemptId = getContext().getApplicationAttemptId();
     synchronized (pluginInitLock) {
-      LlapTaskSchedulerService peer = LlapTaskSchedulerService.instance;
+      LlapTaskSchedulerService peer = 
LlapTaskSchedulerService.pendingSchedulers.remove(appAttemptId);

Review Comment:
   Would like to know what do you think about extracting this handshake logic 
into a separate singleton class `LlapPluginRendezvous` since test already bears 
that name? The benefit is that this would allow us to avoid static fields cross 
read between those two classes. While the separate singleton class will work as 
an intermediary for both. 



##########
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java:
##########
@@ -241,6 +257,16 @@ public void start() {
   @Override
   public void shutdown() {
     super.shutdown();
+    // Reap our rendezvous entry if we parked ourselves at construction and 
are being torn down

Review Comment:
   I don't know if we want to provide that much of a context in the comment for 
3-liner? On the other hand, that might be another +1 to a separate class to 
handle rendezvous handshake, we can comment the purpose in the javadoc of that 
class. What do you think? 



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

Reply via email to