HDFS-10792. RedundantEditLogInputStream should log caught exceptions. Contributed by Wei-Chiu Chuang.

(cherry picked from commit ae13a5ccbe)
This commit is contained in:
Ayush Saxena 2020-05-31 17:06:44 +05:30 committed by S O'Donnell
parent 91d229bf35
commit 968c95bfba
1 changed files with 3 additions and 1 deletions

View File

@ -170,6 +170,7 @@ class RedundantEditLogInputStream extends EditLogInputStream {
}
return nextOp();
} catch (IOException e) {
LOG.warn("encountered an exception", e);
return null;
}
}
@ -228,7 +229,8 @@ class RedundantEditLogInputStream extends EditLogInputStream {
"streams are shorter than the current one! The best " +
"remaining edit log ends at transaction " +
newLast + ", but we thought we could read up to transaction " +
oldLast + ". If you continue, metadata will be lost forever!");
oldLast + ". If you continue, metadata will be lost forever!",
prevException);
}
LOG.error("Got error reading edit log input stream " +
streams[curIdx].getName() + "; failing over to edit log " +