junegunn commented on code in PR #6951:
URL: https://github.com/apache/hbase/pull/6951#discussion_r2071003300


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/ModifyTableProcedure.java:
##########
@@ -231,10 +232,19 @@ protected Flow executeFromState(final MasterProcedureEnv 
env, final ModifyTableS
         case MODIFY_TABLE_REOPEN_ALL_REGIONS:
           if (isTableEnabled(env)) {
             Configuration conf = env.getMasterConfiguration();
-            long backoffMillis = 
conf.getLong(PROGRESSIVE_BATCH_BACKOFF_MILLIS_KEY,
-              PROGRESSIVE_BATCH_BACKOFF_MILLIS_DEFAULT);
+            // Use table configuration if defined
+            final TableDescriptor descriptor =
+              
env.getMasterServices().getTableDescriptors().get(getTableName());
+            long backoffMillis =
+              
Optional.ofNullable(descriptor.getValue(PROGRESSIVE_BATCH_BACKOFF_MILLIS_KEY))
+                .map(Long::parseLong)
+                .orElseGet(() -> 
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_DISABLED);
+              
Optional.ofNullable(descriptor.getValue(PROGRESSIVE_BATCH_SIZE_MAX_KEY))
+                .map(Integer::parseInt).orElseGet(() -> 
conf.getInt(PROGRESSIVE_BATCH_SIZE_MAX_KEY,
+                  PROGRESSIVE_BATCH_SIZE_MAX_DISABLED));
+

Review Comment:
   I didn't add a test case for this change because it's minimal and quite 
self-evident.
   
   Also, it's a little tricky to add a test case, because the values are used 
for a parameterized constructor call, which is not easily verifiable with 
Mockito. We could extract the code to a helper method or add another 
constructor that takes `env`, but both approaches feel like overkill – the 
latter would require many changes to the existing test cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to