Junegunn Choi created HBASE-29909:
-------------------------------------
Summary: RegionMover ignores configuration properties passed via
-D on the command line
Key: HBASE-29909
URL: https://issues.apache.org/jira/browse/HBASE-29909
Project: HBase
Issue Type: Bug
Reporter: Junegunn Choi
h2. Problem
When running RegionMover from the command line, Hadoop configuration properties
passed via {{-D}} are silently ignored.
For example:
{code}
hbase org.apache.hadoop.hbase.util.RegionMover -Dhbase.move.wait.max=600 -r
host -o unload
{code}
The {{-Dhbase.move.wait.max=600}} has no effect.
h2. Cause
{{AbstractHBaseTool.doStaticMain}} calls
{{ToolRunner.run(HBaseConfiguration.create(), this, args)}}, which correctly
parses {{-D}} properties and sets them on the tool's {{Configuration}} via
{{setConf()}}.
However, {{RegionMover.processOptions}} then creates a {{new
RegionMoverBuilder(hostname)}} using the single-argument constructor,
discarding the configuration from ToolRunner.
h2. Fix
Change {{processOptions}} to pass the tool's existing configuration to the
two-arg constructor:
{code:java}
rmbuilder = new RegionMoverBuilder(hostname, getConf());
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)