Skip to content

Commit 6df4cb1

Browse files
authored
HBASE-26114 when “hbase.mob.compaction.threads.max” is set to a negative number, HMaster cannot start normally (#3541)
Signed-off-by: Anoop <[email protected]>
1 parent f049301 commit 6df4cb1

File tree

1 file changed

+2
-1
lines changed
  • hbase-server/src/main/java/org/apache/hadoop/hbase/mob

1 file changed

+2
-1
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,8 @@ public static void doMobCompaction(Configuration conf, FileSystem fs, TableName
863863
public static ExecutorService createMobCompactorThreadPool(Configuration conf) {
864864
int maxThreads = conf.getInt(MobConstants.MOB_COMPACTION_THREADS_MAX,
865865
MobConstants.DEFAULT_MOB_COMPACTION_THREADS_MAX);
866-
if (maxThreads == 0) {
866+
// resets to default mob compaction thread number when the user sets this value incorrectly
867+
if (maxThreads <= 0) {
867868
maxThreads = 1;
868869
}
869870
final SynchronousQueue<Runnable> queue = new SynchronousQueue<>();

0 commit comments

Comments
 (0)