org.apache.hadoop.hbase.util.hbck
Interface TableIntegrityErrorHandler

All Known Implementing Classes:
TableIntegrityErrorHandlerImpl

public interface TableIntegrityErrorHandler

This interface provides callbacks for handling particular table integrity invariant violations. This could probably be boiled down to handling holes and handling overlaps but currently preserves the older more specific error condition codes.


Method Summary
 HBaseFsck.TableInfo getTableInfo()
           
 void handleDegenerateRegion(HBaseFsck.HbckInfo hi)
          Callback for handling a region that has the same start and end key.
 void handleDuplicateStartKeys(HBaseFsck.HbckInfo hi1, HBaseFsck.HbckInfo hi2)
          Callback for handling two regions that have the same start key.
 void handleHoleInRegionChain(byte[] holeStartKey, byte[] holeEndKey)
          Callback for handling a region hole between two keys.
 void handleOverlapGroup(Collection<HBaseFsck.HbckInfo> overlap)
          Callback for handling an group of regions that overlap.
 void handleOverlapInRegionChain(HBaseFsck.HbckInfo hi1, HBaseFsck.HbckInfo hi2)
          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 handleRegionStartKeyNotEmpty(HBaseFsck.HbckInfo hi)
          Callback for handling case where a Table has a first region that does not have an empty start key.
 void setTableInfo(HBaseFsck.TableInfo ti)
          Set the TableInfo used by all HRegionInfos fabricated by other callbacks
 

Method Detail

getTableInfo

HBaseFsck.TableInfo getTableInfo()

setTableInfo

void setTableInfo(HBaseFsck.TableInfo ti)
Set the TableInfo used by all HRegionInfos fabricated by other callbacks


handleRegionStartKeyNotEmpty

void handleRegionStartKeyNotEmpty(HBaseFsck.HbckInfo hi)
                                  throws IOException
Callback for handling case where a Table has a first region that does not have an empty start key.

Parameters:
hi - An HbckInfo 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

void handleRegionEndKeyNotEmpty(byte[] curEndKey)
                                throws IOException
Callback for handling case where a Table has a last region that does not have an empty end key.

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

void handleDegenerateRegion(HBaseFsck.HbckInfo hi)
                            throws IOException
Callback for handling a region that has the same start and end key.

Parameters:
hi - An HbckInfo for a degenerate key.
Throws:
IOException

handleDuplicateStartKeys

void handleDuplicateStartKeys(HBaseFsck.HbckInfo hi1,
                              HBaseFsck.HbckInfo hi2)
                              throws IOException
Callback for handling two regions that have the same start key. This is a specific case of a region overlap.

Parameters:
hi1 - one of the overlapping HbckInfo
hi2 - the other overlapping HbckInfo
Throws:
IOException

handleOverlapInRegionChain

void handleOverlapInRegionChain(HBaseFsck.HbckInfo hi1,
                                HBaseFsck.HbckInfo hi2)
                                throws IOException
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.

Parameters:
hi1 - one of the overlapping HbckInfo
hi2 - the other overlapping HbckInfo
Throws:
IOException

handleHoleInRegionChain

void handleHoleInRegionChain(byte[] holeStartKey,
                             byte[] holeEndKey)
                             throws IOException
Callback for handling a region hole between two keys.

Parameters:
holeStartKey - key at the beginning of the region hole
holeEndKey - key at the end of the region hole
Throws:
IOException

handleOverlapGroup

void handleOverlapGroup(Collection<HBaseFsck.HbckInfo> overlap)
                        throws IOException
Callback for handling an group of regions that overlap.

Parameters:
overlap - Collection of overlapping regions.
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.