Skip to content

Commit d8a3309

Browse files
committed
HDFS-11709. StandbyCheckpointer should handle an non-existing legacyOivImageDir gracefully. Contributed by Erik Krogen.
1 parent 61cda39 commit d8a3309

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
@@ -197,7 +197,12 @@ private void doCheckpoint(boolean sendCheckpoint) throws InterruptedException, I
197197
// Save the legacy OIV image, if the output dir is defined.
198198
String outputDir = checkpointConf.getLegacyOivImageDir();
199199
if (outputDir != null && !outputDir.isEmpty()) {
200-
img.saveLegacyOIVImage(namesystem, outputDir, canceler);
200+
try {
201+
img.saveLegacyOIVImage(namesystem, outputDir, canceler);
202+
} catch (IOException ioe) {
203+
LOG.error("Exception encountered while saving legacy OIV image; "
204+
+ "continuing with other checkpointing steps", ioe);
205+
}
201206
}
202207
} finally {
203208
namesystem.cpUnlock();

0 commit comments

Comments
 (0)