diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java index 0531b138d74..c45fdff7ca1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java @@ -35,6 +35,7 @@ import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.PrivateCellUtil; import org.apache.hadoop.hbase.TableName; @@ -371,12 +372,13 @@ public class DefaultMobStoreCompactor extends DefaultCompactor { // Added to support migration try { mobCell = mobStore.resolve(c, true, false).getCell(); - } catch (FileNotFoundException fnfe) { - if (discardMobMiss) { + } catch (DoNotRetryIOException e) { + if (discardMobMiss && e.getCause() != null + && e.getCause() instanceof FileNotFoundException) { LOG.error("Missing MOB cell: file={} not found cell={}", fName, c); continue; } else { - throw fnfe; + throw e; } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java index a5f806952d7..50530dad69e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java @@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.PrivateCellUtil; import org.apache.hadoop.hbase.TableName; @@ -192,12 +193,13 @@ public class FaultyMobStoreCompactor extends DefaultMobStoreCompactor { // Added to support migration try { mobCell = mobStore.resolve(c, true, false).getCell(); - } catch (FileNotFoundException fnfe) { - if (discardMobMiss) { - LOG.error("Missing MOB cell: file={} not found", fName); + } catch (DoNotRetryIOException e) { + if (discardMobMiss && e.getCause() != null + && e.getCause() instanceof FileNotFoundException) { + LOG.error("Missing MOB cell: file={} not found cell={}", fName, c); continue; } else { - throw fnfe; + throw e; } }