xiaoyuyao commented on a change in pull request #2277:
URL: https://github.com/apache/ozone/pull/2277#discussion_r641713924



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/CloseContainerEventHandler.java
##########
@@ -99,6 +101,14 @@ public void onMessage(ContainerID containerID, 
EventPublisher publisher) {
     }
   }
 
+  private String getContainerToken(ContainerID containerID) {
+    StorageContainerManager scm = scmContext.getScm();
+    return scm != null
+        ? scm.getContainerTokenGenerator()
+            .generateEncodedToken(getClass().getSimpleName(), containerID)

Review comment:
       Yes. I mean a class name can be confusing here as the close container 
command are sent by scm. There are other cases where scm admin cli can send the 
close container command to datanode, where should also use proper user from 
UGI. 




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

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