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

This commit is contained in:
Arpit Agarwal 2017-05-25 10:42:24 -07:00 committed by Xiaoyu Yao
parent f5d3faba5f
commit 48f83077ad
1 changed files with 2 additions and 8 deletions

View File

@ -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