From 6dc4190c07a6e3039f6c32bdc9a8aeb5483ea192 Mon Sep 17 00:00:00 2001 From: Jingcheng Du Date: Thu, 18 May 2017 18:54:58 +0800 Subject: [PATCH] HBASE-18049 It is not necessary to re-open the region when MOB files cannot be found --- .../org/apache/hadoop/hbase/regionserver/HMobStore.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java index 032e383561d..73c8a1ff148 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java @@ -35,6 +35,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.ArrayBackedTag; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellComparator; +import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; @@ -427,6 +428,13 @@ public class HMobStore extends HStore { + " or it is corrupt"); if (readEmptyValueOnMobCellMiss) { return null; + } else if ((throwable instanceof FileNotFoundException) + || (throwable.getCause() instanceof FileNotFoundException)) { + // The region is re-opened when FileNotFoundException is thrown. + // This is not necessary when MOB files cannot be found, because the store files + // in a region only contain the references to MOB files and a re-open on a region + // doesn't help fix the lost MOB files. + throw new DoNotRetryIOException(throwable); } else if (throwable instanceof IOException) { throw (IOException) throwable; } else {