public static class RegionMover.RegionMoverBuilder extends Object
build()
method to create RegionMover object. Has
filename(String)
, excludeFile(String)
, maxthreads(int)
,
ack(boolean)
, timeout(int)
, designatedFile(String)
methods to set
the corresponding options.Modifier and Type | Field and Description |
---|---|
private boolean |
ack |
private org.apache.hadoop.conf.Configuration |
conf |
private String |
defaultDir |
private String |
designatedFile |
private String |
excludeFile |
private String |
filename |
private String |
hostname |
private int |
maxthreads |
(package private) int |
port |
private RackManager |
rackManager |
private int |
timeout |
Constructor and Description |
---|
RegionMoverBuilder(String hostname) |
RegionMoverBuilder(String hostname,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
RegionMover.RegionMoverBuilder |
ack(boolean ack)
Set ack/noAck mode.
|
RegionMover |
build()
This method builds the appropriate RegionMover object which can then be used to load/unload
using load and unload methods
|
private static org.apache.hadoop.conf.Configuration |
createConf()
Creates a new configuration and sets region mover specific overrides
|
RegionMover.RegionMoverBuilder |
designatedFile(String designatedFile)
Set the designated file.
|
RegionMover.RegionMoverBuilder |
excludeFile(String excludefile)
Path of file containing hostnames to be excluded during region movement.
|
RegionMover.RegionMoverBuilder |
filename(String filename)
Path of file where regions will be written to during unloading/read from during loading n
* @return RegionMoverBuilder object
|
RegionMover.RegionMoverBuilder |
maxthreads(int threads)
Set the max number of threads that will be used to move regions
|
RegionMover.RegionMoverBuilder |
rackManager(RackManager rackManager)
Set specific rackManager implementation.
|
RegionMover.RegionMoverBuilder |
timeout(int timeout)
Set the timeout for Load/Unload operation in seconds.This is a global timeout,threadpool for
movers also have a separate time which is hbase.move.wait.max * number of regions to
load/unload
|
private boolean ack
private int maxthreads
private int timeout
private String excludeFile
private String designatedFile
private String defaultDir
@InterfaceAudience.Private final int port
private final org.apache.hadoop.conf.Configuration conf
private RackManager rackManager
public RegionMoverBuilder(String hostname)
public RegionMoverBuilder(String hostname, org.apache.hadoop.conf.Configuration conf)
hostname
- Hostname to unload regions from or load regions to. Can be either hostname or
hostname:port.conf
- Configuration objectprivate static org.apache.hadoop.conf.Configuration createConf()
public RegionMover.RegionMoverBuilder filename(String filename)
public RegionMover.RegionMoverBuilder maxthreads(int threads)
public RegionMover.RegionMoverBuilder excludeFile(String excludefile)
public RegionMover.RegionMoverBuilder designatedFile(String designatedFile)
designatedFile
- The designated filepublic RegionMover.RegionMoverBuilder ack(boolean ack)
In ack mode regions are acknowledged before and after moving and the move is retried hbase.move.retries.max times, if unsuccessful we quit with exit code 1.No Ack mode is a best effort mode,each region movement is tried once.This can be used during graceful shutdown as even if we have a stuck region,upon shutdown it'll be reassigned anyway.
n * @return RegionMoverBuilder object
public RegionMover.RegionMoverBuilder timeout(int timeout)
timeout
- in seconds@InterfaceAudience.Private public RegionMover.RegionMoverBuilder rackManager(RackManager rackManager)
rackManager
- rackManager implpublic RegionMover build() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.