Skip to content

Commit fc46f39

Browse files
committed
HDFS-11709. StandbyCheckpointer should handle an non-existing legacyOivImageDir gracefully. Contributed by Erik Krogen.
(cherry picked from commit d8a3309)
1 parent b500714 commit fc46f39

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,12 @@ private void doCheckpoint() throws InterruptedException, IOException {
190190
// Save the legacy OIV image, if the output dir is defined.
191191
String outputDir = checkpointConf.getLegacyOivImageDir();
192192
if (outputDir != null && !outputDir.isEmpty()) {
193-
img.saveLegacyOIVImage(namesystem, outputDir, canceler);
193+
try {
194+
img.saveLegacyOIVImage(namesystem, outputDir, canceler);
195+
} catch (IOException ioe) {
196+
LOG.error("Exception encountered while saving legacy OIV image; "
197+
+ "continuing with other checkpointing steps", ioe);
198+
}
194199
}
195200
} finally {
196201
namesystem.cpUnlock();

0 commit comments

Comments
 (0)