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_r394681647
 
 

 ##########
 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 added TODO in OMProxyInfo.java. Based on @arp7 offline comments 
removed TODO and create a Jira to resolve this.
   https://issues.apache.org/jira/browse/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