|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.util.HBaseFsck
public class HBaseFsck
Check consistency among the in-memory states of the master and the region server(s) and the state of data in HDFS.
| Nested Class Summary | |
|---|---|
static interface |
HBaseFsck.ErrorReporter
|
static class |
HBaseFsck.HbckInfo
Maintain information about a particular region. |
static class |
HBaseFsck.RegionInfoLoadException
|
| Field Summary | |
|---|---|
static long |
DEFAULT_SLEEP_BEFORE_RERUN
|
static long |
DEFAULT_TIME_LAG
|
| Constructor Summary | |
|---|---|
HBaseFsck(org.apache.hadoop.conf.Configuration conf)
Constructor |
|
| Method Summary | |
|---|---|
void |
checkHdfs()
Scan HDFS for all regions, recording their information into regionInfo |
void |
connect()
|
void |
displayFullReport()
Display the full report from fsck. |
int |
doWork()
Contacts the master and prints out cluster-wide information |
void |
dumpOverlapProblems(com.google.common.collect.Multimap<byte[],HBaseFsck.HbckInfo> regions)
|
HBaseFsck.ErrorReporter |
getErrors()
|
com.google.common.collect.Multimap<byte[],HBaseFsck.HbckInfo> |
getOverlapGroups(String table)
|
static void |
main(String[] args)
Main program |
protected static void |
printUsageAndExit()
|
boolean |
rebuildMeta()
Rebuilds meta from information in hdfs/fs. |
void |
setFixErrors(boolean shouldFix)
Fix inconsistencies found by fsck. |
void |
setTimeLag(long seconds)
We are interested in only those tables that have not changed their state in META during the last few seconds specified by hbase.admin.fsck.timelag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_TIME_LAG
public static final long DEFAULT_SLEEP_BEFORE_RERUN
| Constructor Detail |
|---|
public HBaseFsck(org.apache.hadoop.conf.Configuration conf)
throws MasterNotRunningException,
ZooKeeperConnectionException,
IOException
conf - Configuration object
MasterNotRunningException - if the master is not running
ZooKeeperConnectionException - if unable to connect to zookeeper
IOException| Method Detail |
|---|
public void connect()
throws MasterNotRunningException,
ZooKeeperConnectionException
MasterNotRunningException
ZooKeeperConnectionException
public int doWork()
throws IOException,
org.apache.zookeeper.KeeperException,
InterruptedException
IOException - if a remote or network exception occurs
org.apache.zookeeper.KeeperException
InterruptedExceptionpublic HBaseFsck.ErrorReporter getErrors()
public boolean rebuildMeta()
throws IOException,
InterruptedException
IOException
InterruptedException
public void checkHdfs()
throws IOException,
InterruptedException
IOException
InterruptedExceptionpublic void dumpOverlapProblems(com.google.common.collect.Multimap<byte[],HBaseFsck.HbckInfo> regions)
public com.google.common.collect.Multimap<byte[],HBaseFsck.HbckInfo> getOverlapGroups(String table)
public void displayFullReport()
public void setFixErrors(boolean shouldFix)
public void setTimeLag(long seconds)
seconds - - the time in secondsprotected static void printUsageAndExit()
public static void main(String[] args)
throws Exception
args -
HBaseFsck.RegionInfoLoadException
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||