@InterfaceAudience.Private public class HFileCorruptionChecker extends Object
Modifier and Type | Class and Description |
---|---|
private class |
HFileCorruptionChecker.RegionDirChecker
An individual work item for parallelized regiondir processing.
|
Modifier and Type | Field and Description |
---|---|
(package private) CacheConfig |
cacheConf |
(package private) org.apache.hadoop.conf.Configuration |
conf |
(package private) Set<org.apache.hadoop.fs.Path> |
corrupted |
(package private) ExecutorService |
executor |
(package private) Set<org.apache.hadoop.fs.Path> |
failures |
(package private) org.apache.hadoop.fs.FileSystem |
fs |
(package private) AtomicInteger |
hfilesChecked |
(package private) boolean |
inQuarantineMode |
private static org.apache.commons.logging.Log |
LOG |
(package private) Set<org.apache.hadoop.fs.Path> |
missing |
(package private) Set<org.apache.hadoop.fs.Path> |
quarantined |
Constructor and Description |
---|
HFileCorruptionChecker(org.apache.hadoop.conf.Configuration conf,
ExecutorService executor,
boolean quarantine) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkColFamDir(org.apache.hadoop.fs.Path cfDir)
Check all files in a column family dir.
|
protected void |
checkHFile(org.apache.hadoop.fs.Path p)
Checks a path to see if it is a valid hfile.
|
protected void |
checkRegionDir(org.apache.hadoop.fs.Path regionDir)
Check all column families in a region dir.
|
(package private) void |
checkTableDir(org.apache.hadoop.fs.Path tableDir)
Check all the regiondirs in the specified tableDir
|
void |
checkTables(Collection<org.apache.hadoop.fs.Path> tables)
Check the specified table dirs for bad hfiles.
|
(package private) org.apache.hadoop.fs.Path |
createQuarantinePath(org.apache.hadoop.fs.Path hFile)
Given a path, generates a new path to where we move a corrupted hfile (bad
trailer, no trailer).
|
Collection<org.apache.hadoop.fs.Path> |
getCorrupted() |
Collection<org.apache.hadoop.fs.Path> |
getFailures() |
int |
getHFilesChecked() |
Collection<org.apache.hadoop.fs.Path> |
getMissing() |
Collection<org.apache.hadoop.fs.Path> |
getQuarantined() |
void |
report(HBaseFsck.ErrorReporter out)
Print a human readable summary of hfile quarantining operations.
|
private static final org.apache.commons.logging.Log LOG
final org.apache.hadoop.conf.Configuration conf
final org.apache.hadoop.fs.FileSystem fs
final CacheConfig cacheConf
final ExecutorService executor
final Set<org.apache.hadoop.fs.Path> corrupted
final Set<org.apache.hadoop.fs.Path> failures
final Set<org.apache.hadoop.fs.Path> quarantined
final Set<org.apache.hadoop.fs.Path> missing
final boolean inQuarantineMode
final AtomicInteger hfilesChecked
public HFileCorruptionChecker(org.apache.hadoop.conf.Configuration conf, ExecutorService executor, boolean quarantine) throws IOException
IOException
protected void checkHFile(org.apache.hadoop.fs.Path p) throws IOException
p
- full Path to an HFileIOException
- This is a connectivity related exceptionorg.apache.hadoop.fs.Path createQuarantinePath(org.apache.hadoop.fs.Path hFile) throws IOException
hFile
- Path to a corrupt hfile (assumes that it is HBASE_DIR/ table
/region/cf/file)IOException
protected void checkColFamDir(org.apache.hadoop.fs.Path cfDir) throws IOException
cfDir
- column family directoryIOException
protected void checkRegionDir(org.apache.hadoop.fs.Path regionDir) throws IOException
regionDir
- region directoryIOException
void checkTableDir(org.apache.hadoop.fs.Path tableDir) throws IOException
tableDir
- path to a tableIOException
public void checkTables(Collection<org.apache.hadoop.fs.Path> tables) throws IOException
IOException
public Collection<org.apache.hadoop.fs.Path> getFailures()
public Collection<org.apache.hadoop.fs.Path> getCorrupted()
public int getHFilesChecked()
public Collection<org.apache.hadoop.fs.Path> getQuarantined()
public Collection<org.apache.hadoop.fs.Path> getMissing()
public void report(HBaseFsck.ErrorReporter out)
out
- Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.