@InterfaceAudience.Private public class HBaseFsckRepair extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.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(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri,
HTableDescriptor htd)
Creates, flushes, and closes a new region.
|
static void |
fixMetaHoleOnlineAndAddReplicas(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri,
Collection<ServerName> servers,
int numReplicas)
Puts the specified HRegionInfo into META with replica related columns
|
static void |
fixMultiAssignment(HConnection connection,
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(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.
|
private static void |
forceOfflineInZK(Admin admin,
HRegionInfo region)
In 0.90, this forces an HRI offline by setting the RegionTransitionData
in ZK to have HBCK_CODE_NAME as the server.
|
static void |
removeParentInMeta(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri) |
static void |
waitUntilAssigned(Admin admin,
HRegionInfo region) |
public static void fixMultiAssignment(HConnection connection, HRegionInfo region, List<ServerName> servers) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
connection - HBase connection to the clusterregion - Region to undeployservers - list of Servers to undeploy fromIOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void fixUnassigned(Admin admin, HRegionInfo region) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
admin - region - IOExceptionorg.apache.zookeeper.KeeperExceptionInterruptedExceptionprivate static void forceOfflineInZK(Admin admin, HRegionInfo region) throws ZooKeeperConnectionException, org.apache.zookeeper.KeeperException, IOException, InterruptedException
ZooKeeperConnectionExceptionorg.apache.zookeeper.KeeperExceptionIOExceptionInterruptedExceptionThis doesn't seem to work properly in the updated version of 0.92+'s hbck
so we use assign to force the region into transition. This has the
side-effect of requiring a HRegionInfo that considers regionId (timestamp)
in comparators that is addressed by HBASE-5563.public static void waitUntilAssigned(Admin admin, HRegionInfo region) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void closeRegionSilentlyAndWait(HConnection connection, ServerName server, HRegionInfo region) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void fixMetaHoleOnlineAndAddReplicas(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri,
Collection<ServerName> servers,
int numReplicas)
throws IOException
IOExceptionpublic static HRegion createHDFSRegionDir(org.apache.hadoop.conf.Configuration conf, HRegionInfo hri, HTableDescriptor htd) throws IOException
IOExceptionpublic static void removeParentInMeta(org.apache.hadoop.conf.Configuration conf,
HRegionInfo hri)
throws IOException
IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.