소스 검색

HDFS-11878. Fix journal missing log httpServerUrl address in JournalNodeSyncer. Contributed by Hanisha Koneru.

Arpit Agarwal 8 년 전
부모
커밋
4fb41b31db
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 8
      hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java

+ 2 - 8
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java

@@ -285,14 +285,8 @@ public class JournalNodeSyncer {
         boolean success = false;
         try {
           if (remoteJNproxy.httpServerUrl == null) {
-            if (response.hasFromURL()) {
-              URI uri = URI.create(response.getFromURL());
-              remoteJNproxy.httpServerUrl = getHttpServerURI(uri.getScheme(),
-                  uri.getHost(), uri.getPort());
-            } else {
-              remoteJNproxy.httpServerUrl = getHttpServerURI("http",
-                  remoteJNproxy.jnAddr.getHostName(), response.getHttpPort());
-            }
+            remoteJNproxy.httpServerUrl = getHttpServerURI("http",
+                remoteJNproxy.jnAddr.getHostName(), response.getHttpPort());
           }
 
           String urlPath = GetJournalEditServlet.buildPath(jid, missingLog