diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt index 16ccf997fb..d2cf71efb6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-3077.txt @@ -26,3 +26,5 @@ HDFS-3799. QJM: handle empty log segments during recovery (todd) HDFS-3797. QJM: add segment txid as a parameter to journal() RPC (todd) HDFS-3800. improvements to QJM fault testing (todd) + +HDFS-3823. QJM: TestQJMWithFaults fails occasionally because of missed setting of HTTP port. (todd and atm) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java index 56f494f186..9d19ec173b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/IPCLoggerChannel.java @@ -359,6 +359,11 @@ public ListenableFuture prepareRecovery( return executor.submit(new Callable() { @Override public PrepareRecoveryResponseProto call() throws IOException { + if (httpPort < 0) { + // If the HTTP port hasn't been set yet, force an RPC call so we know + // what the HTTP port should be. + httpPort = getProxy().getJournalState(journalId).getHttpPort(); + } return getProxy().prepareRecovery(createReqInfo(), segmentTxId); } });