You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ha...@apache.org on 2020/04/02 22:13:56 UTC

[hadoop-ozone] branch master updated: HDDS-3324. OM Client fails with StringIndexOutOfBoundsException. (#759)

This is an automated email from the ASF dual-hosted git repository.

hanishakoneru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new f1da73b  HDDS-3324. OM Client fails with StringIndexOutOfBoundsException. (#759)
f1da73b is described below

commit f1da73b531f81b349c11948e88345b002dd417e1
Author: Bharat Viswanadham <bh...@apache.org>
AuthorDate: Thu Apr 2 15:13:47 2020 -0700

    HDDS-3324. OM Client fails with StringIndexOutOfBoundsException. (#759)
---
 .../org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java
index 37a637e..20a954e 100644
--- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java
+++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProvider.java
@@ -204,7 +204,13 @@ public class OMFailoverProxyProvider implements
       }
     }
 
-    return new Text(rpcAddress.toString().substring(1));
+    if (!rpcAddress.toString().isEmpty()) {
+      return new Text(rpcAddress.toString().substring(1));
+    } else {
+      // If all OM addresses are unresolvable, set dt service to null. Let
+      // this fail in later step when during connection setup.
+      return null;
+    }
   }
 
   @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org