Package org.apache.hadoop.hbase.util
Class RegionMover.RegionMoverBuilder
java.lang.Object
org.apache.hadoop.hbase.util.RegionMover.RegionMoverBuilder
- Enclosing class:
- RegionMover
Builder for Region mover. Use the
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.-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegionMoverBuilder
(String hostname) RegionMoverBuilder
(String hostname, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionack
(boolean ack) Set ack/noAck mode.build()
This method builds the appropriate RegionMover object which can then be used to load/unload using load and unload methodsprivate static org.apache.hadoop.conf.Configuration
Creates a new configuration and sets region mover specific overridesdesignatedFile
(String designatedFile) Set the designated file.excludeFile
(String excludefile) Path of file containing hostnames to be excluded during region movement.Path of file where regions will be written to during unloading/read from during loadingisolateRegionIdArray
(List<String> isolateRegionIdArray) Set the region ID to isolate on the region server.maxthreads
(int threads) Set the max number of threads that will be used to move regionsrackManager
(RackManager rackManager) Set specific rackManager implementation.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
-
Field Details
-
ack
-
maxthreads
-
timeout
-
isolateRegionIdArray
-
hostname
-
filename
-
excludeFile
-
designatedFile
-
defaultDir
-
port
-
conf
-
rackManager
-
-
Constructor Details
-
RegionMoverBuilder
-
RegionMoverBuilder
- Parameters:
hostname
- Hostname to unload regions from or load regions to. Can be either hostname or hostname:port.conf
- Configuration object
-
-
Method Details
-
createConf
Creates a new configuration and sets region mover specific overrides -
filename
Path of file where regions will be written to during unloading/read from during loading- Returns:
- RegionMoverBuilder object
-
maxthreads
Set the max number of threads that will be used to move regions -
isolateRegionIdArray
Set the region ID to isolate on the region server. -
excludeFile
Path of file containing hostnames to be excluded during region movement. Exclude file should have 'host:port' per line. Port is mandatory here as we can have many RS running on a single host. -
designatedFile
Set the designated file. Designated file contains hostnames where region moves. Designated file should have 'host:port' per line. Port is mandatory here as we can have many RS running on a single host.- Parameters:
designatedFile
- The designated file- Returns:
- RegionMoverBuilder object
-
ack
Set ack/noAck mode.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.
- Returns:
- RegionMoverBuilder object
-
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- Parameters:
timeout
- in seconds- Returns:
- RegionMoverBuilder object
-
rackManager
Set specific rackManager implementation. This setter method is for testing purpose only.- Parameters:
rackManager
- rackManager impl- Returns:
- RegionMoverBuilder object
-
build
This method builds the appropriate RegionMover object which can then be used to load/unload using load and unload methods- Returns:
- RegionMover object
- Throws:
IOException
-