class HbckTableInfo.HDFSIntegrityFixer extends HbckTableInfo.IntegrityFixSuggester
Modifier and Type | Field and Description |
---|---|
(package private) org.apache.hadoop.conf.Configuration |
conf |
(package private) boolean |
fixOverlaps |
errors
Constructor and Description |
---|
HDFSIntegrityFixer(HbckTableInfo ti,
HbckErrorReporter errors,
org.apache.hadoop.conf.Configuration conf,
boolean fixHoles,
boolean fixOverlaps) |
Modifier and Type | Method and Description |
---|---|
void |
handleHoleInRegionChain(byte[] holeStartKey,
byte[] holeStopKey)
There is a hole in the hdfs regions that violates the table integrity
rules.
|
void |
handleOverlapGroup(Collection<HbckRegionInfo> overlap)
This takes set of overlapping regions and merges them into a single
region.
|
void |
handleRegionEndKeyNotEmpty(byte[] curEndKey)
Callback for handling case where a Table has a last region that does not
have an empty end key.
|
void |
handleRegionStartKeyNotEmpty(HbckRegionInfo next)
This is a special case hole -- when the first region of a table is
missing from META, HBase doesn't acknowledge the existance of the
table.
|
(package private) void |
mergeOverlaps(Collection<HbckRegionInfo> overlap) |
(package private) void |
removeParentsAndFixSplits(Collection<HbckRegionInfo> overlap) |
(package private) void |
sidelineBigOverlaps(Collection<HbckRegionInfo> bigOverlap)
Sideline some regions in a big overlap group so that it
will have fewer regions, and it is easier to merge them later on.
|
handleDegenerateRegion, handleDuplicateStartKeys, handleOverlapInRegionChain, handleSplit
getTableInfo, setTableInfo
org.apache.hadoop.conf.Configuration conf
boolean fixOverlaps
HDFSIntegrityFixer(HbckTableInfo ti, HbckErrorReporter errors, org.apache.hadoop.conf.Configuration conf, boolean fixHoles, boolean fixOverlaps)
public void handleRegionStartKeyNotEmpty(HbckRegionInfo next) throws IOException
handleRegionStartKeyNotEmpty
in interface TableIntegrityErrorHandler
handleRegionStartKeyNotEmpty
in class HbckTableInfo.IntegrityFixSuggester
next
- An HbckRegionInfo of the second region in a table. This should have
a non-empty startkey, and can be used to fabricate a first region that
has an empty start key.IOException
public void handleRegionEndKeyNotEmpty(byte[] curEndKey) throws IOException
TableIntegrityErrorHandlerImpl
handleRegionEndKeyNotEmpty
in interface TableIntegrityErrorHandler
handleRegionEndKeyNotEmpty
in class HbckTableInfo.IntegrityFixSuggester
curEndKey
- The end key of the current last region. There should be a new region
with start key as this and an empty end key.IOException
public void handleHoleInRegionChain(byte[] holeStartKey, byte[] holeStopKey) throws IOException
handleHoleInRegionChain
in interface TableIntegrityErrorHandler
handleHoleInRegionChain
in class HbckTableInfo.IntegrityFixSuggester
holeStartKey
- key at the beginning of the region holeholeStopKey
- key at the end of the region holeIOException
public void handleOverlapGroup(Collection<HbckRegionInfo> overlap) throws IOException
handleOverlapGroup
in interface TableIntegrityErrorHandler
handleOverlapGroup
in class TableIntegrityErrorHandlerImpl
overlap
- Collection of overlapping regions.IOException
void removeParentsAndFixSplits(Collection<HbckRegionInfo> overlap) throws IOException
IOException
void mergeOverlaps(Collection<HbckRegionInfo> overlap) throws IOException
IOException
void sidelineBigOverlaps(Collection<HbckRegionInfo> bigOverlap) throws IOException
bigOverlap
- the overlapped group with regions more than maxMergeIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.