org.apache.hadoop.hbase
Class KeyValue.MetaComparator

java.lang.Object
  extended by org.apache.hadoop.hbase.KeyValue.KVComparator
      extended by org.apache.hadoop.hbase.KeyValue.MetaComparator
All Implemented Interfaces:
Comparator<Cell>, KeyValue.SamePrefixComparator<byte[]>, org.apache.hadoop.io.RawComparator<Cell>
Enclosing class:
KeyValue

public static class KeyValue.MetaComparator
extends KeyValue.KVComparator

A KeyValue.KVComparator for hbase:meta catalog table KeyValues.


Constructor Summary
KeyValue.MetaComparator()
           
 
Method Summary
protected  Object clone()
           
protected  int compareRowKey(Cell l, Cell r)
          Override the row key comparison to parse and compare the meta row key parts.
 int compareRows(byte[] left, int loffset, int llength, byte[] right, int roffset, int rlength)
          Compare key portion of a KeyValue for keys in hbase:meta table.
 String getLegacyKeyComparatorName()
          The HFileV2 file format's trailer contains this class name.
 byte[] getShortMidpointKey(byte[] leftKey, byte[] rightKey)
          Don't do any fancy Block Index splitting tricks.
 
Methods inherited from class org.apache.hadoop.hbase.KeyValue.KVComparator
calcIndexKey, compare, compare, compareColumns, compareFlatKey, compareFlatKey, compareIgnoringPrefix, compareKey, compareRows, compareTimestamps, matchingRowColumn, matchingRows, matchingRows
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

KeyValue.MetaComparator

public KeyValue.MetaComparator()
Method Detail

compareRows

public int compareRows(byte[] left,
                       int loffset,
                       int llength,
                       byte[] right,
                       int roffset,
                       int rlength)
Compare key portion of a KeyValue for keys in hbase:meta table.

Overrides:
compareRows in class KeyValue.KVComparator
Returns:
0 if equal, <0 if left smaller, >0 if right smaller

getShortMidpointKey

public byte[] getShortMidpointKey(byte[] leftKey,
                                  byte[] rightKey)
Don't do any fancy Block Index splitting tricks.

Overrides:
getShortMidpointKey in class KeyValue.KVComparator
Returns:
0 if equal, <0 if left smaller, >0 if right smaller

getLegacyKeyComparatorName

public String getLegacyKeyComparatorName()
The HFileV2 file format's trailer contains this class name. We reinterpret this and instantiate the appropriate comparator. TODO: With V3 consider removing this.

Overrides:
getLegacyKeyComparatorName in class KeyValue.KVComparator
Returns:
legacy class name for FileFileTrailer#comparatorClassName

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class KeyValue.KVComparator
Throws:
CloneNotSupportedException

compareRowKey

protected int compareRowKey(Cell l,
                            Cell r)
Override the row key comparison to parse and compare the meta row key parts.

Overrides:
compareRowKey in class KeyValue.KVComparator
Returns:
0 if equal, <0 if left smaller, >0 if right smaller


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.