diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneClientUtils.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneClientUtils.java index f38dd7ed0c7..e337d12240c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneClientUtils.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/OzoneClientUtils.java @@ -382,7 +382,7 @@ public final class OzoneClientUtils { if ((value == null) || value.isEmpty()) { return Optional.absent(); } - return Optional.of(HostAndPort.fromString(value).getHost()); + return Optional.of(HostAndPort.fromString(value).getHostText()); } /**