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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]