@InterfaceAudience.Public public class RegionMover extends org.apache.hadoop.hbase.util.AbstractHBaseTool implements Closeable
load() or unload() methods for the desired operations.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MOVE_RETRIES_MAX |
static int |
DEFAULT_MOVE_WAIT_MAX |
static int |
DEFAULT_SERVERSTART_WAIT_MAX |
static String |
MOVE_RETRIES_MAX_KEY |
static String |
MOVE_WAIT_MAX_KEY |
static String |
SERVERSTART_WAIT_MAX_KEY |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOptions()
Override this to add command-line options using
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String) and similar methods. |
void |
close() |
protected int |
doWork()
The "main function" of the tool
|
boolean |
load()
Loads the specified
hostname with regions listed in the filename RegionMover
Object has to be created using RegionMover(RegionMoverBuilder) |
static void |
main(String[] args) |
protected void |
processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
This method is called to process the options after they have been parsed.
|
boolean |
unload()
Unload regions from given
hostname using ack/noAck mode and maxthreads.In
noAck mode we do not make sure that region is successfully online on the target region
server,hence it is best effort.We do not unload regions to hostnames given in
excludeFile. |
boolean |
unloadFromRack()
Unload regions from given
hostname using ack/noAck mode and maxthreads.In
noAck mode we do not make sure that region is successfully online on the target region
server,hence it is best effort.We do not unload regions to hostnames given in
excludeFile. |
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, printUsage, processOldArgs, run, setConfpublic static final String MOVE_RETRIES_MAX_KEY
public static final String MOVE_WAIT_MAX_KEY
public static final String SERVERSTART_WAIT_MAX_KEY
public static final int DEFAULT_MOVE_RETRIES_MAX
public static final int DEFAULT_MOVE_WAIT_MAX
public static final int DEFAULT_SERVERSTART_WAIT_MAX
public void close()
close in interface Closeableclose in interface AutoCloseablepublic boolean load() throws ExecutionException, InterruptedException, TimeoutException
hostname with regions listed in the filename RegionMover
Object has to be created using RegionMover(RegionMoverBuilder)ExecutionExceptionInterruptedExceptionTimeoutExceptionpublic boolean unload() throws InterruptedException, ExecutionException, TimeoutException
hostname using ack/noAck mode and maxthreads.In
noAck mode we do not make sure that region is successfully online on the target region
server,hence it is best effort.We do not unload regions to hostnames given in
excludeFile. If designatedFile is present with some contents, we will unload regions
to hostnames provided in designatedFileInterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean unloadFromRack() throws InterruptedException, ExecutionException, TimeoutException
hostname using ack/noAck mode and maxthreads.In
noAck mode we do not make sure that region is successfully online on the target region
server,hence it is best effort.We do not unload regions to hostnames given in
excludeFile. If designatedFile is present with some contents, we will unload regions
to hostnames provided in designatedFile. While unloading regions, destination
RegionServers are selected from different rack i.e regions should not move to any RegionServers
that belong to same rack as source RegionServer.InterruptedExceptionExecutionExceptionTimeoutExceptionprotected void addOptions()
org.apache.hadoop.hbase.util.AbstractHBaseToolAbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String) and similar methods.addOptions in class org.apache.hadoop.hbase.util.AbstractHBaseToolprotected void processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
org.apache.hadoop.hbase.util.AbstractHBaseToolprocessOptions in class org.apache.hadoop.hbase.util.AbstractHBaseToolprotected int doWork() throws Exception
org.apache.hadoop.hbase.util.AbstractHBaseTooldoWork in class org.apache.hadoop.hbase.util.AbstractHBaseToolExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.