@InterfaceAudience.Private public class HBaseFsckRepair extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
HBaseFsckRepair() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeRegionSilentlyAndWait(HBaseAdmin admin,
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(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri,
HTableDescriptor htd)
Creates, flushes, and closes a new region.
|
static void |
fixMetaHoleOnline(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri)
Puts the specified HRegionInfo into META.
|
static void |
fixMultiAssignment(HBaseAdmin admin,
HRegionInfo region,
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(HBaseAdmin 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(HBaseAdmin admin,
HRegionInfo region) |
public static void fixMultiAssignment(HBaseAdmin admin, HRegionInfo region, List<ServerName> servers) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
admin - HBase admin used to undeployregion - Region to undeployservers - list of Servers to undeploy fromIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void fixUnassigned(HBaseAdmin admin, HRegionInfo region) throws IOException, org.apache.zookeeper.KeeperException
admin - region - IOExceptionorg.apache.zookeeper.KeeperExceptionpublic static void waitUntilAssigned(HBaseAdmin admin, HRegionInfo region) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void closeRegionSilentlyAndWait(HBaseAdmin admin, ServerName server, HRegionInfo region) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void fixMetaHoleOnline(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri)
throws IOException
IOExceptionpublic static HRegion createHDFSRegionDir(org.apache.hadoop.conf.Configuration conf, HRegionInfo hri, HTableDescriptor htd) throws IOException
IOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.