bharatviswa504 commented on a change in pull request #51: HDDS-2311. Fix logic 
of RetryPolicy in OzoneClientSideTranslatorPB.
URL: https://github.com/apache/hadoop-ozone/pull/51#discussion_r336324051
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
 ##########
 @@ -347,7 +355,12 @@ private OMResponse submitRequest(OMRequest omRequest)
 
       return omResponse;
     } catch (ServiceException e) {
-      throw ProtobufHelper.getRemoteException(e);
+      NotLeaderException notLeaderException = getNotLeaderException(e);
+      if (notLeaderException == null) {
+        throw ProtobufHelper.getRemoteException(e);
+      } else {
+        throw new NotLeaderException("Could not determine OM Leader.");
 
 Review comment:
   we can throw notLeaderException which we have received in Line 358.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to