Class TableIntegrityErrorHandlerImpl
java.lang.Object
org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandlerImpl
- All Implemented Interfaces:
TableIntegrityErrorHandler
- Direct Known Subclasses:
HbckTableInfo.IntegrityFixSuggester
@Private
public abstract class TableIntegrityErrorHandlerImpl
extends Object
implements TableIntegrityErrorHandler
Simple implementation of TableIntegrityErrorHandler. Can be used as a base class.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Callback for handling a region that has the same start and end key.void
Callback for handling two regions that have the same start key.void
handleHoleInRegionChain
(byte[] holeStart, byte[] holeEnd) Callback for handling a region hole between two keys.void
handleOverlapGroup
(Collection<HbckRegionInfo> overlap) Callback for handling an group of regions that overlap.void
Callback for handling two reigons that overlap in some arbitrary way.void
handleRegionEndKeyNotEmpty
(byte[] curEndKey) Callback for handling case where a Table has a last region that does not have an empty end key.void
Callback for handling case where a Table has a first region that does not have an empty start key.void
Set the TableInfo used by all HRegionInfos fabricated by other callbacksMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandler
handleSplit
-
Field Details
-
ti
-
-
Constructor Details
-
TableIntegrityErrorHandlerImpl
public TableIntegrityErrorHandlerImpl()
-
-
Method Details
-
getTableInfo
- Specified by:
getTableInfo
in interfaceTableIntegrityErrorHandler
-
setTableInfo
Set the TableInfo used by all HRegionInfos fabricated by other callbacks- Specified by:
setTableInfo
in interfaceTableIntegrityErrorHandler
-
handleRegionStartKeyNotEmpty
Callback for handling case where a Table has a first region that does not have an empty start key.- Specified by:
handleRegionStartKeyNotEmpty
in interfaceTableIntegrityErrorHandler
- Parameters:
hi
- 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.- Throws:
IOException
-
handleRegionEndKeyNotEmpty
Callback for handling case where a Table has a last region that does not have an empty end key.- Specified by:
handleRegionEndKeyNotEmpty
in interfaceTableIntegrityErrorHandler
- Parameters:
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.- Throws:
IOException
-
handleDegenerateRegion
Callback for handling a region that has the same start and end key.- Specified by:
handleDegenerateRegion
in interfaceTableIntegrityErrorHandler
- Parameters:
hi
- An HbckRegionInfo for a degenerate key.- Throws:
IOException
-
handleDuplicateStartKeys
Callback for handling two regions that have the same start key. This is a specific case of a region overlap.- Specified by:
handleDuplicateStartKeys
in interfaceTableIntegrityErrorHandler
- Parameters:
hi1
- one of the overlapping HbckRegionInfohi2
- the other overlapping HbckRegionInfo- Throws:
IOException
-
handleOverlapInRegionChain
Callback for handling two reigons that overlap in some arbitrary way. This is a specific case of region overlap, and called for each possible pair. If two regions have the same start key, the handleDuplicateStartKeys method is called.- Specified by:
handleOverlapInRegionChain
in interfaceTableIntegrityErrorHandler
- Parameters:
hi1
- one of the overlapping HbckRegionInfohi2
- the other overlapping HbckRegionInfo- Throws:
IOException
-
handleHoleInRegionChain
Callback for handling a region hole between two keys.- Specified by:
handleHoleInRegionChain
in interfaceTableIntegrityErrorHandler
- Parameters:
holeStart
- key at the beginning of the region holeholeEnd
- key at the end of the region hole- Throws:
IOException
-
handleOverlapGroup
Callback for handling an group of regions that overlap.- Specified by:
handleOverlapGroup
in interfaceTableIntegrityErrorHandler
- Parameters:
overlap
- Collection of overlapping regions.- Throws:
IOException
-