@InterfaceAudience.Private public class HBaseFsckRepair extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
HBaseFsckRepair() |
Modifier and Type | Method and Description |
---|---|
static void |
closeRegionSilentlyAndWait(Connection connection,
ServerName server,
RegionInfo 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,
RegionInfo hri,
TableDescriptor htd)
Creates, flushes, and closes a new region.
|
static void |
fixMetaHoleOnlineAndAddReplicas(org.apache.hadoop.conf.Configuration conf,
RegionInfo hri,
Collection<ServerName> servers,
int numReplicas)
Puts the specified RegionInfo into META with replica related columns
|
static void |
fixMultiAssignment(Connection connection,
RegionInfo 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,
RegionInfo 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,
RegionInfo 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,
RegionInfo hri) |
static void |
waitUntilAssigned(Admin admin,
RegionInfo region) |
private static final org.slf4j.Logger LOG
public HBaseFsckRepair()
public static void fixMultiAssignment(Connection connection, RegionInfo 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 fromIOException
org.apache.zookeeper.KeeperException
InterruptedException
public static void fixUnassigned(Admin admin, RegionInfo region) throws IOException, org.apache.zookeeper.KeeperException, InterruptedException
admin
- region
- IOException
org.apache.zookeeper.KeeperException
InterruptedException
private static void forceOfflineInZK(Admin admin, RegionInfo region) throws ZooKeeperConnectionException, org.apache.zookeeper.KeeperException, IOException, InterruptedException
ZooKeeperConnectionException
org.apache.zookeeper.KeeperException
IOException
InterruptedException
public static void waitUntilAssigned(Admin admin, RegionInfo region) throws IOException, InterruptedException
IOException
InterruptedException
public static void closeRegionSilentlyAndWait(Connection connection, ServerName server, RegionInfo region) throws IOException, InterruptedException
IOException
InterruptedException
public static void fixMetaHoleOnlineAndAddReplicas(org.apache.hadoop.conf.Configuration conf, RegionInfo hri, Collection<ServerName> servers, int numReplicas) throws IOException
IOException
public static HRegion createHDFSRegionDir(org.apache.hadoop.conf.Configuration conf, RegionInfo hri, TableDescriptor htd) throws IOException
IOException
public static void removeParentInMeta(org.apache.hadoop.conf.Configuration conf, RegionInfo hri) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.