@InterfaceAudience.Private public class HBaseFsckRepair extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static Log |
LOG |
| Constructor and Description |
|---|
HBaseFsckRepair() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeRegionSilentlyAndWait(HConnection connection,
ServerName server,
HRegionInfo region)
Contacts a region server and waits up to hbase.hbck.close.timeout ms
(default 120s) to close the region.
|
static HRegion |
createHDFSRegionDir(Configuration conf,
HRegionInfo hri,
HTableDescriptor htd)
Creates, flushes, and closes a new region.
|
static void |
fixMetaHoleOnlineAndAddReplicas(Configuration conf,
HRegionInfo hri,
java.util.Collection<ServerName> servers,
int numReplicas)
Puts the specified HRegionInfo into META with replica related columns
|
static void |
fixMultiAssignment(HConnection connection,
HRegionInfo region,
java.util.List<ServerName> servers)
Fix multiple assignment by doing silent closes on each RS hosting the region
and then force ZK unassigned node to OFFLINE to trigger assignment by
master.
|
static void |
fixUnassigned(Admin admin,
HRegionInfo region)
Fix unassigned by creating/transition the unassigned ZK node for this
region to OFFLINE state with a special flag to tell the master that this is
a forced operation by HBCK.
|
static void |
waitUntilAssigned(Admin admin,
HRegionInfo region) |
public static void fixMultiAssignment(HConnection connection, HRegionInfo region, java.util.List<ServerName> servers) throws java.io.IOException, KeeperException, java.lang.InterruptedException
connection - HBase connection to the clusterregion - Region to undeployservers - list of Servers to undeploy fromjava.io.IOExceptionKeeperExceptionjava.lang.InterruptedExceptionpublic static void fixUnassigned(Admin admin, HRegionInfo region) throws java.io.IOException, KeeperException, java.lang.InterruptedException
admin - region - java.io.IOExceptionKeeperExceptionjava.lang.InterruptedExceptionpublic static void waitUntilAssigned(Admin admin, HRegionInfo region) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic static void closeRegionSilentlyAndWait(HConnection connection, ServerName server, HRegionInfo region) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic static void fixMetaHoleOnlineAndAddReplicas(Configuration conf,
HRegionInfo hri,
java.util.Collection<ServerName> servers,
int numReplicas)
throws java.io.IOException
java.io.IOExceptionpublic static HRegion createHDFSRegionDir(Configuration conf, HRegionInfo hri, HTableDescriptor htd) throws java.io.IOException
java.io.IOException