public static class RegionMover.RegionMoverBuilder extends Object
build()
method to create RegionMover object. Has
filename(String)
, excludeFile(String)
, maxthreads(int)
,
ack(boolean)
, timeout(int)
methods to set the corresponding optionsModifier and Type | Field and Description |
---|---|
private boolean |
ack |
private org.apache.hadoop.conf.Configuration |
conf |
private String |
defaultDir |
private String |
excludeFile |
private String |
filename |
private String |
hostname |
private int |
maxthreads |
(package private) int |
port |
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 |
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
|
RegionMover.RegionMoverBuilder |
maxthreads(int threads)
Set the max number of threads that will be used to move regions
|
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 defaultDir
final int port
private final org.apache.hadoop.conf.Configuration conf
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)
filename
- public RegionMover.RegionMoverBuilder maxthreads(int threads)
public RegionMover.RegionMoverBuilder excludeFile(String excludefile)
public 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.
ack
- public RegionMover.RegionMoverBuilder timeout(int timeout)
timeout
- in secondspublic RegionMover build() throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.