@InterfaceAudience.Private public class HFileCorruptionChecker extends Object
Modifier and Type | Class and Description |
---|---|
private class |
HFileCorruptionChecker.MobRegionDirChecker
An individual work item for parallelized mob dir processing.
|
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) Set<org.apache.hadoop.fs.Path> |
corruptedMobFiles |
(package private) ExecutorService |
executor |
(package private) Set<org.apache.hadoop.fs.Path> |
failureMobFiles |
(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.slf4j.Logger |
LOG |
(package private) Set<org.apache.hadoop.fs.Path> |
missedMobFiles |
(package private) Set<org.apache.hadoop.fs.Path> |
missing |
(package private) AtomicInteger |
mobFilesChecked |
(package private) Set<org.apache.hadoop.fs.Path> |
quarantined |
(package private) Set<org.apache.hadoop.fs.Path> |
quarantinedMobFiles |
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 |
checkMobColFamDir(org.apache.hadoop.fs.Path cfDir)
Check all files in a mob column family dir.
|
protected void |
checkMobFile(org.apache.hadoop.fs.Path p)
Checks a path to see if it is a valid mob file.
|
private void |
checkMobRegionDir(org.apache.hadoop.fs.Path regionDir)
Checks all the mob files of a table.
|
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.
|
private HFileCorruptionChecker.MobRegionDirChecker |
createMobRegionDirChecker(org.apache.hadoop.fs.Path tableDir)
Creates an instance of MobRegionDirChecker.
|
(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> |
getCorruptedMobFiles() |
Collection<org.apache.hadoop.fs.Path> |
getFailureMobFiles() |
Collection<org.apache.hadoop.fs.Path> |
getFailures() |
int |
getHFilesChecked() |
Collection<org.apache.hadoop.fs.Path> |
getMissedMobFiles() |
Collection<org.apache.hadoop.fs.Path> |
getMissing() |
int |
getMobFilesChecked() |
Collection<org.apache.hadoop.fs.Path> |
getQuarantined() |
Collection<org.apache.hadoop.fs.Path> |
getQuarantinedMobFiles() |
void |
report(HbckErrorReporter out)
Print a human readable summary of hfile quarantining operations.
|
private static final org.slf4j.Logger 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> quarantined
final Set<org.apache.hadoop.fs.Path> corruptedMobFiles
final Set<org.apache.hadoop.fs.Path> failureMobFiles
final Set<org.apache.hadoop.fs.Path> missedMobFiles
final Set<org.apache.hadoop.fs.Path> quarantinedMobFiles
final boolean inQuarantineMode
final AtomicInteger hfilesChecked
final AtomicInteger mobFilesChecked
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 checkMobColFamDir(org.apache.hadoop.fs.Path cfDir) throws IOException
cfDir
- mob column family directoryIOException
protected void checkMobFile(org.apache.hadoop.fs.Path p) throws IOException
p
- full Path to a mob file.IOException
- This is a connectivity related exceptionprivate void checkMobRegionDir(org.apache.hadoop.fs.Path regionDir) throws IOException
regionDir
- The mob region 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
private HFileCorruptionChecker.MobRegionDirChecker createMobRegionDirChecker(org.apache.hadoop.fs.Path tableDir)
tableDir
- The current table directory.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 Collection<org.apache.hadoop.fs.Path> getFailureMobFiles()
public Collection<org.apache.hadoop.fs.Path> getCorruptedMobFiles()
public int getMobFilesChecked()
public Collection<org.apache.hadoop.fs.Path> getQuarantinedMobFiles()
public Collection<org.apache.hadoop.fs.Path> getMissedMobFiles()
public void report(HbckErrorReporter out)
out
- Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.