Skip to content

Commit

Permalink
HBASE-26107 MOB compaction with missing files catches incorrect excep…
Browse files Browse the repository at this point in the history
…tion (#3511)

Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Pankaj Kumar <[email protected]>
  • Loading branch information
petersomogyi authored Jul 22, 2021
1 parent 9e27de6 commit 3c70bc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
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;
Expand Down Expand Up @@ -371,12 +372,13 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
// 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;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
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;
Expand Down Expand Up @@ -192,12 +193,13 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
// 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;
}
}

Expand Down

0 comments on commit 3c70bc1

Please sign in to comment.