This is an automated email from the ASF dual-hosted git repository.
junegunn pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new a293412b3c9 HBASE-29909 RegionMover ignores configuration passed via
-D on the command line (#7767)
a293412b3c9 is described below
commit a293412b3c942e4879ac5c2cd2737aea829e203c
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')));