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



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java
##########
@@ -790,6 +795,23 @@ public boolean getReplicationManagerStatus() {
         .collect(Collectors.toList());
   }
 
+  @Override
+  public Token<?> getContainerToken(ContainerID containerID)
+      throws IOException {
+    String remoteUser = getRemoteUserName();
+    getScm().checkAdminAccess(remoteUser);
+
+    if (!blockTokenEnabled) {

Review comment:
       should we use the container token enabled key to determine whether 
return a valid container token or not?

##########
File path: 
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerOperationClient.java
##########
@@ -86,6 +91,8 @@ public ContainerOperationClient(OzoneConfiguration conf) 
throws IOException {
       replicationFactor = HddsProtos.ReplicationFactor.ONE;
       replicationType = HddsProtos.ReplicationType.STAND_ALONE;
     }
+    blockTokenEnabled = conf.getBoolean(HDDS_BLOCK_TOKEN_ENABLED,

Review comment:
       same as above?




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