hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [32/48] hadoop git commit: HDDS-796. Fix failed test TestStorageContainerManagerHttpServer#testHttpPolicy.
Date Tue, 06 Nov 2018 18:06:06 GMT
HDDS-796. Fix failed test TestStorageContainerManagerHttpServer#testHttpPolicy.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/15df2e7a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/15df2e7a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/15df2e7a

Branch: refs/heads/HDFS-13532
Commit: 15df2e7a7547e12e884b624d9f17ad2799d9ccf9
Parents: d43cc5d
Author: Yiqun Lin <yqlin@apache.org>
Authored: Mon Nov 5 17:31:06 2018 +0800
Committer: Yiqun Lin <yqlin@apache.org>
Committed: Mon Nov 5 17:31:06 2018 +0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hdds/server/BaseHttpServer.java    | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/15df2e7a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
index 2726fc3..5e7d7b8 100644
--- a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
+++ b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
@@ -115,13 +115,10 @@ public abstract class BaseHttpServer {
     final Optional<Integer> addressPort =
         getPortNumberFromConfigKeys(conf, addressKey);
 
-    final Optional<String> addresHost =
+    final Optional<String> addressHost =
         getHostNameFromConfigKeys(conf, addressKey);
 
-    String hostName = bindHost.orElse(addresHost.get());
-    if (hostName == null || hostName.isEmpty()) {
-      hostName = bindHostDefault;
-    }
+    String hostName = bindHost.orElse(addressHost.orElse(bindHostDefault));
 
     return NetUtils.createSocketAddr(
         hostName + ":" + addressPort.orElse(bindPortdefault));


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


Mime
View raw message