From 4fb41b31dbc109f11898ea6d8fc0bb3e6c20d89b Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Thu, 25 May 2017 10:42:24 -0700 Subject: [PATCH] HDFS-11878. Fix journal missing log httpServerUrl address in JournalNodeSyncer. Contributed by Hanisha Koneru. --- .../hadoop/hdfs/qjournal/server/JournalNodeSyncer.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java index 73defc219d..99bd499082 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNodeSyncer.java @@ -285,14 +285,8 @@ private void getMissingLogSegments(List thisJournalEditLogs, 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