bshashikant commented on a change in pull request #833: HDDS-3314. FIx 
ContainerOperationClient#readContainer to use Grpc Client to read from datanode
URL: https://github.com/apache/hadoop-ozone/pull/833#discussion_r410099334
 
 

 ##########
 File path: 
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/ContainerOperationClient.java
 ##########
 @@ -382,7 +382,7 @@ public ContainerDataProto readContainer(long containerID,
       Pipeline pipeline) throws IOException {
     XceiverClientSpi client = null;
     try {
-      client = xceiverClientManager.acquireClient(pipeline);
+      client = xceiverClientManager.acquireClientForReadData(pipeline);
 
 Review comment:
   @bharat, if we use acquireClientForReadData, it will use XceiverClientGrpc 
to read the info rather than Ratis(which reads only from the leader if we use 
acquireClient). XceiverClientGrpc automatically fails over from datanode to 
another and retries if it sees a failure.
   
   InfoSubCommand has recently been changed to not use readContainer call to 
read data from datanode. But , in Ozone, as we only use XceiverClientGrpc to 
read from datanode , it make sense here to use the same while reading the 
containerData as well (acquireClient -> acquireClientForReadData). This 
function is used by ChunkKeyHandler. I have modified the description of the ira 
accordingly.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to