org.apache.hadoop.hbase.util.hbck
Class TableIntegrityErrorHandlerImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandlerImpl
All Implemented Interfaces:
TableIntegrityErrorHandler

public abstract class TableIntegrityErrorHandlerImpl
extends Object
implements TableIntegrityErrorHandler

Simple implementation of TableIntegrityErrorHandler. Can be used as a base class.


Constructor Summary
TableIntegrityErrorHandlerImpl()
           
 
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[] holeStart, byte[] holeEnd)
          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 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 ti2)
          Set the TableInfo used by all HRegionInfos fabricated by other callbacks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableIntegrityErrorHandlerImpl

public TableIntegrityErrorHandlerImpl()
Method Detail

getTableInfo

public HBaseFsck.TableInfo getTableInfo()
Specified by:
getTableInfo in interface TableIntegrityErrorHandler

setTableInfo

public void setTableInfo(HBaseFsck.TableInfo ti2)
Description copied from interface: TableIntegrityErrorHandler
Set the TableInfo used by all HRegionInfos fabricated by other callbacks

Specified by:
setTableInfo in interface TableIntegrityErrorHandler

handleRegionStartKeyNotEmpty

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

Specified by:
handleRegionStartKeyNotEmpty in interface TableIntegrityErrorHandler
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

handleDegenerateRegion

public void handleDegenerateRegion(HBaseFsck.HbckInfo hi)
                            throws IOException
Description copied from interface: TableIntegrityErrorHandler
Callback for handling a region that has the same start and end key.

Specified by:
handleDegenerateRegion in interface TableIntegrityErrorHandler
Parameters:
hi - An HbckInfo for a degenerate key.
Throws:
IOException

handleDuplicateStartKeys

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

Specified by:
handleDuplicateStartKeys in interface TableIntegrityErrorHandler
Throws:
IOException

handleOverlapInRegionChain

public void handleOverlapInRegionChain(HBaseFsck.HbckInfo hi1,
                                       HBaseFsck.HbckInfo hi2)
                                throws IOException
Description copied from interface: TableIntegrityErrorHandler
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 interface TableIntegrityErrorHandler
Throws:
IOException

handleHoleInRegionChain

public void handleHoleInRegionChain(byte[] holeStart,
                                    byte[] holeEnd)
                             throws IOException
Description copied from interface: TableIntegrityErrorHandler
Callback for handling a region hole between two keys.

Specified by:
handleHoleInRegionChain in interface TableIntegrityErrorHandler
Throws:
IOException

handleOverlapGroup

public void handleOverlapGroup(Collection<HBaseFsck.HbckInfo> overlap)
                        throws IOException
Description copied from interface: TableIntegrityErrorHandler
Callback for handling an group of regions that overlap.

Specified by:
handleOverlapGroup in interface TableIntegrityErrorHandler
Throws:
IOException


Copyright © 2012 Cloudera. All Rights Reserved.