@InterfaceAudience.Private @InterfaceStability.Evolving public class HbckChore extends ScheduledChore
Modifier and Type | Field and Description |
---|---|
private long |
checkingEndTimestamp |
private long |
checkingStartTimestamp |
private static int |
DEFAULT_HBCK_CHORE_INTERVAL |
private boolean |
disabled |
private Set<String> |
disabledTableRegions |
private static String |
HBCK_CHORE_INTERVAL |
private Map<String,Pair<ServerName,List<ServerName>>> |
inconsistentRegions
The inconsistent regions.
|
private Map<String,Pair<ServerName,List<ServerName>>> |
inconsistentRegionsSnapshot |
private static org.slf4j.Logger |
LOG |
private MasterServices |
master |
private Map<String,org.apache.hadoop.fs.Path> |
orphanRegionsOnFS
The regions have directory on FileSystem, but no region info in meta.
|
private Map<String,org.apache.hadoop.fs.Path> |
orphanRegionsOnFSSnapshot |
private Map<String,ServerName> |
orphanRegionsOnRS
The regions only opened on RegionServers, but no region info in meta.
|
private Map<String,ServerName> |
orphanRegionsOnRSSnapshot
The "snapshot" is used to save the last round's HBCK checking report.
|
private Map<String,HbckRegionInfo> |
regionInfoMap
This map contains the state of all hbck items.
|
private boolean |
running
When running, the "snapshot" may be changed when this round's checking finish.
|
(package private) ReentrantReadWriteLock |
rwLock
The "snapshot" may be changed after checking.
|
Constructor and Description |
---|
HbckChore(MasterServices master) |
Modifier and Type | Method and Description |
---|---|
protected void |
chore()
The task to execute on each scheduled execution of the Chore
|
private void |
disableChore() |
long |
getCheckingEndTimestamp()
Used for web ui to show when the HBCK checking report generated.
|
long |
getCheckingStartTimestamp()
Used for web ui to show when the HBCK checking started.
|
Map<String,Pair<ServerName,List<ServerName>>> |
getInconsistentRegions()
Found the inconsistent regions.
|
Map<String,org.apache.hadoop.fs.Path> |
getOrphanRegionsOnFS() |
Map<String,ServerName> |
getOrphanRegionsOnRS() |
boolean |
isDisabled() |
boolean |
isRunning()
When running, the HBCK report may be changed later.
|
private void |
loadRegionsFromFS() |
private void |
loadRegionsFromInMemoryState() |
private void |
loadRegionsFromRSReport() |
protected boolean |
runChore() |
private void |
saveCheckResultToSnapshot() |
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, toString, triggerNow
private static final org.slf4j.Logger LOG
private static final String HBCK_CHORE_INTERVAL
private static final int DEFAULT_HBCK_CHORE_INTERVAL
private final MasterServices master
private final Map<String,HbckRegionInfo> regionInfoMap
private final Set<String> disabledTableRegions
private final Map<String,ServerName> orphanRegionsOnRS
private final Map<String,org.apache.hadoop.fs.Path> orphanRegionsOnFS
private final Map<String,Pair<ServerName,List<ServerName>>> inconsistentRegions
private final Map<String,ServerName> orphanRegionsOnRSSnapshot
private final Map<String,org.apache.hadoop.fs.Path> orphanRegionsOnFSSnapshot
private final Map<String,Pair<ServerName,List<ServerName>>> inconsistentRegionsSnapshot
ReentrantReadWriteLock rwLock
private volatile boolean running
private volatile long checkingStartTimestamp
private volatile long checkingEndTimestamp
private boolean disabled
public HbckChore(MasterServices master)
protected void chore()
ScheduledChore
chore
in class ScheduledChore
protected boolean runChore()
private void disableChore()
public boolean isDisabled()
private void saveCheckResultToSnapshot()
private void loadRegionsFromInMemoryState()
private void loadRegionsFromRSReport()
private void loadRegionsFromFS() throws IOException
IOException
public boolean isRunning()
public Map<String,ServerName> getOrphanRegionsOnRS()
public Map<String,org.apache.hadoop.fs.Path> getOrphanRegionsOnFS()
public Map<String,Pair<ServerName,List<ServerName>>> getInconsistentRegions()
public long getCheckingStartTimestamp()
public long getCheckingEndTimestamp()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.