Skip to content

Commit cf2b0cb

Browse files
committed
HBASE-28742 Fixes NPE for CompactionTool when mslab enabled
1 parent b7d11a7 commit cf2b0cb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ public void setup(Context context) {
211211
} catch (IOException e) {
212212
throw new RuntimeException("Could not get the input FileSystem", e);
213213
}
214+
// Disable the MemStoreLAB as MemStore is not used by flow during compaction
215+
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
214216
}
215217

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

0 commit comments

Comments
 (0)