This is an automated email from the ASF dual-hosted git repository.

junegunn pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new babeac1a603 HBASE-29909 RegionMover ignores configuration passed via 
-D on the command line (#7767)
babeac1a603 is described below

commit babeac1a6032c7d93b2dbb9d703258d76d667ac8
Author: Junegunn Choi <[email protected]>
AuthorDate: Tue Jun 9 08:51:34 2026 +0900

    HBASE-29909 RegionMover ignores configuration passed via -D on the command 
line (#7767)
    
    Signed-off-by: Charles Connell <[email protected]>
---
 .../main/java/org/apache/hadoop/hbase/util/RegionMover.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java
index e3db13c0b66..3873786ddb7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java
@@ -183,7 +183,11 @@ public class RegionMover extends AbstractHBaseTool 
implements Closeable {
      * Creates a new configuration and sets region mover specific overrides
      */
     private static Configuration createConf() {
-      Configuration conf = HBaseConfiguration.create();
+      final Configuration conf = HBaseConfiguration.create();
+      return overrideConf(conf);
+    }
+
+    private static Configuration overrideConf(Configuration conf) {
       conf.setInt("hbase.client.prefetch.limit", 1);
       conf.setInt("hbase.client.pause", 500);
       conf.setInt("hbase.client.retries.number", 100);
@@ -205,7 +209,7 @@ public class RegionMover extends AbstractHBaseTool 
implements Closeable {
       }
       this.filename = defaultDir + File.separator + 
System.getProperty("user.name") + this.hostname
         + ":" + Integer.toString(this.port);
-      this.conf = conf;
+      this.conf = overrideConf(new Configuration(conf));
     }
 
     /**
@@ -924,7 +928,7 @@ public class RegionMover extends AbstractHBaseTool 
implements Closeable {
   @Override
   protected void processOptions(CommandLine cmd) {
     String hostname = cmd.getOptionValue("r");
-    rmbuilder = new RegionMoverBuilder(hostname);
+    rmbuilder = new RegionMoverBuilder(hostname, getConf());
     this.loadUnload = cmd.getOptionValue("o").toLowerCase(Locale.ROOT);
     if (cmd.hasOption('m')) {
       rmbuilder.maxthreads(Integer.parseInt(cmd.getOptionValue('m')));

Reply via email to