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

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


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

commit bc1b1aa1e0893fe2db853478d304d21f82e86959
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 06708a7874b..e5bed9c6310 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
@@ -170,7 +170,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);
@@ -192,7 +196,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));
     }
 
     /**
@@ -911,7 +915,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