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 optionsConstructor 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
|
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
|
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 objectpublic 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 Cloudera. All rights reserved.