|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.byterange.ByteRangeSet
@InterfaceAudience.Private public abstract class ByteRangeSet
Performance oriented class for de-duping and storing arbitrary byte[]'s arriving in non-sorted order. Appends individual byte[]'s to a single big byte[] to avoid overhead and garbage.
Current implementations are ByteRangeHashSet
and
ByteRangeTreeSet
, but other options might be a
trie-oriented ByteRangeTrieSet, etc
Field Summary | |
---|---|
protected byte[] |
byteAppender
fields |
protected int |
numBytes
|
protected int |
numInputs
|
protected int |
numUniqueRanges
|
protected int[] |
sortedIndexByInsertionId
|
protected List<Integer> |
sortedIndexByUniqueIndex
|
protected ArrayList<ByteRange> |
sortedRanges
|
protected Map<ByteRange,Integer> |
uniqueIndexByUniqueRange
|
protected int[] |
uniqueRangeIndexByInsertionId
|
protected ArrayList<ByteRange> |
uniqueRanges
|
Constructor Summary | |
---|---|
protected |
ByteRangeSet()
construct |
Method Summary | |
---|---|
void |
add(ByteRange bytes)
Check if the incoming byte range exists. |
abstract void |
addToSortedRanges()
abstract |
ByteRangeSet |
compile()
|
long |
getAvgSize()
|
int |
getSortedIndexForInsertionId(int insertionId)
|
ArrayList<ByteRange> |
getSortedRanges()
get/set |
void |
reset()
|
int |
size()
|
protected int |
store(ByteRange bytes)
|
String |
toString()
standard methods |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte[] byteAppender
protected int numBytes
protected Map<ByteRange,Integer> uniqueIndexByUniqueRange
protected ArrayList<ByteRange> uniqueRanges
protected int numUniqueRanges
protected int[] uniqueRangeIndexByInsertionId
protected int numInputs
protected List<Integer> sortedIndexByUniqueIndex
protected int[] sortedIndexByInsertionId
protected ArrayList<ByteRange> sortedRanges
Constructor Detail |
---|
protected ByteRangeSet()
Method Detail |
---|
public void reset()
public abstract void addToSortedRanges()
public void add(ByteRange bytes)
protected int store(ByteRange bytes)
public ByteRangeSet compile()
public int getSortedIndexForInsertionId(int insertionId)
public int size()
public String toString()
toString
in class Object
public ArrayList<ByteRange> getSortedRanges()
public long getAvgSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |