Skip to content

Commit

Permalink
HBASE-28742 Fixes NPE for CompactionTool when mslab enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
vineet4008 committed Jul 19, 2024
1 parent b7d11a7 commit cf2b0cb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public void setup(Context context) {
} catch (IOException e) {
throw new RuntimeException("Could not get the input FileSystem", e);
}
// Disable the MemStoreLAB as MemStore is not used by flow during compaction
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
}

@Override
Expand Down Expand Up @@ -369,6 +371,8 @@ private int doMapReduce(final FileSystem fs, final Set<Path> toCompactDirs,
*/
private int doClient(final FileSystem fs, final Set<Path> toCompactDirs,
final boolean compactOnce, final boolean major) throws IOException {
// Disable the MemStoreLAB as MemStore is not used by flow during compaction
getConf().setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
CompactionWorker worker = new CompactionWorker(fs, getConf());
for (Path path : toCompactDirs) {
worker.compact(path, compactOnce, major);
Expand Down

0 comments on commit cf2b0cb

Please sign in to comment.