diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java index 8ba62b35fb2f..91c237b74f4f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java @@ -19,7 +19,7 @@ import static org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure.PROGRESSIVE_BATCH_BACKOFF_MILLIS_DEFAULT; import static org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure.PROGRESSIVE_BATCH_BACKOFF_MILLIS_KEY; -import static org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure.PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT; +import static org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure.PROGRESSIVE_BATCH_SIZE_MAX_DISABLED; import static org.apache.hadoop.hbase.master.procedure.ReopenTableRegionsProcedure.PROGRESSIVE_BATCH_SIZE_MAX_KEY; import java.io.IOException; @@ -157,7 +157,7 @@ protected Flow executeFromState(final MasterProcedureEnv env, final ModifyTableS long backoffMillis = conf.getLong(PROGRESSIVE_BATCH_BACKOFF_MILLIS_KEY, PROGRESSIVE_BATCH_BACKOFF_MILLIS_DEFAULT); int batchSizeMax = - conf.getInt(PROGRESSIVE_BATCH_SIZE_MAX_KEY, PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT); + conf.getInt(PROGRESSIVE_BATCH_SIZE_MAX_KEY, PROGRESSIVE_BATCH_SIZE_MAX_DISABLED); addChildProcedure( new ReopenTableRegionsProcedure(getTableName(), backoffMillis, batchSizeMax)); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ReopenTableRegionsProcedure.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ReopenTableRegionsProcedure.java index 2d9f2f747268..7a9d0f655190 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ReopenTableRegionsProcedure.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ReopenTableRegionsProcedure.java @@ -59,7 +59,8 @@ public class ReopenTableRegionsProcedure public static final long PROGRESSIVE_BATCH_BACKOFF_MILLIS_DEFAULT = 0L; public static final String PROGRESSIVE_BATCH_SIZE_MAX_KEY = "hbase.reopen.table.regions.progressive.batch.size.max"; - public static final int PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT = Integer.MAX_VALUE; + public static final int PROGRESSIVE_BATCH_SIZE_MAX_DISABLED = -1; + private static final int PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT_VALUE = Integer.MAX_VALUE; // this minimum prevents a max which would break this procedure private static final int MINIMUM_BATCH_SIZE_MAX = 1; @@ -92,7 +93,7 @@ public ReopenTableRegionsProcedure(TableName tableName) { public ReopenTableRegionsProcedure(final TableName tableName, final List regionNames) { this(tableName, regionNames, PROGRESSIVE_BATCH_BACKOFF_MILLIS_DEFAULT, - PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT); + PROGRESSIVE_BATCH_SIZE_MAX_DISABLED); } public ReopenTableRegionsProcedure(final TableName tableName, long reopenBatchBackoffMillis, @@ -105,9 +106,9 @@ public ReopenTableRegionsProcedure(final TableName tableName, final List this.tableName = tableName; this.regionNames = regionNames; this.reopenBatchBackoffMillis = reopenBatchBackoffMillis; - this.reopenBatchSize = reopenBatchSizeMax != PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT + this.reopenBatchSize = reopenBatchSizeMax != PROGRESSIVE_BATCH_SIZE_MAX_DISABLED ? 1 - : PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT; + : PROGRESSIVE_BATCH_SIZE_MAX_DEFAULT_VALUE; this.reopenBatchSizeMax = Math.max(reopenBatchSizeMax, MINIMUM_BATCH_SIZE_MAX); }