bharatviswa504 commented on a change in pull request #695: HDDS-3137. OM 
RpcClient fail with java.lang.IllegalArgumentException.
URL: https://github.com/apache/hadoop-ozone/pull/695#discussion_r395357562
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java
 ##########
 @@ -191,20 +192,19 @@ public Text getCurrentProxyDelegationToken() {
   private Text computeDelegationTokenService() {
     // For HA, this will return "," separated address of all OM's.
     StringBuilder rpcAddress = new StringBuilder();
-    int count = 0;
+
     for (Map.Entry<String, OMProxyInfo> omProxyInfoSet :
         omProxyInfos.entrySet()) {
-      count++;
-      rpcAddress =
-          rpcAddress.append(
-              omProxyInfoSet.getValue().getDelegationTokenService());
+      Text dtService = omProxyInfoSet.getValue().getDelegationTokenService();
 
-      if (omProxyInfos.size() != count) {
-        rpcAddress.append(",");
+      // dtService can be null when during client object creation when one of
+      // the OM configured address in unreachable.
+      if (dtService != null) {
+        rpcAddress.append(",").append(rpcAddress);
 
 Review comment:
   I have an in-progress patch for HDDS-3233. I need to test out the scenario, 
and I see few in cases not resolving the address. Still looking into that part, 
will post the change as part of HDDS-3233.

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