Skip to content

Commit ae13a5c

Browse files
committed
HDFS-10792. RedundantEditLogInputStream should log caught exceptions. Contributed by Wei-Chiu Chuang.
1 parent 19f26a0 commit ae13a5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/RedundantEditLogInputStream.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ protected FSEditLogOp nextValidOp() {
170170
}
171171
return nextOp();
172172
} catch (IOException e) {
173+
LOG.warn("encountered an exception", e);
173174
return null;
174175
}
175176
}
@@ -228,7 +229,8 @@ protected FSEditLogOp nextOp() throws IOException {
228229
"streams are shorter than the current one! The best " +
229230
"remaining edit log ends at transaction " +
230231
newLast + ", but we thought we could read up to transaction " +
231-
oldLast + ". If you continue, metadata will be lost forever!");
232+
oldLast + ". If you continue, metadata will be lost forever!",
233+
prevException);
232234
}
233235
LOG.error("Got error reading edit log input stream " +
234236
streams[curIdx].getName() + "; failing over to edit log " +

0 commit comments

Comments
 (0)