@InterfaceAudience.Private public class Tokenizer extends Object
TokenizerNode
Mainly used for turning Cell rowKeys into a trie, but also used for family and qualifier
encoding.
Modifier and Type | Field and Description |
---|---|
protected static Boolean |
INCLUDE_FULL_TREE_IN_TO_STRING
print/debug
|
protected long |
lastNodeId |
protected int |
maxElementLength |
protected ArrayList<TokenizerNode> |
nodes |
protected int |
numArraysAdded
fields
|
protected int |
numNodes |
protected TokenizerNode |
root |
protected byte[] |
tokens |
protected int |
tokensLength |
protected int |
treeDepth |
Constructor and Description |
---|
Tokenizer()
construct
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(ArrayList<ByteRange> sortedByteRanges)
building
|
protected TokenizerNode |
addNode(TokenizerNode parent,
int nodeDepth,
int tokenStartOffset,
ByteRange token,
int inputTokenOffset) |
void |
addSorted(ByteRange bytes) |
void |
appendNodes(List<TokenizerNode> appendTo,
boolean includeNonLeaves,
boolean includeLeaves) |
Tokenizer |
appendOutputArrayOffsets(List<Integer> offsets) |
protected int |
appendTokenAndRepointByteRange(ByteRange token,
int inputTokenOffset) |
List<byte[]> |
getArrays() |
int |
getMaxElementLength() |
void |
getNode(TokenizerRowSearchResult resultHolder,
byte[] key,
int keyOffset,
int keyLength) |
ArrayList<TokenizerNode> |
getNodes(boolean includeNonLeaves,
boolean includeLeaves) |
int |
getNumAdded()
read
|
TokenizerNode |
getRoot()
get/set
|
String |
getStructuralString() |
int |
getTreeDepth() |
void |
incrementNumOccurrencesOfLatestValue() |
protected long |
nextNodeId() |
void |
reset() |
Tokenizer |
setNodeFirstInsertionIndexes()
write
|
protected void |
submitMaxNodeDepthCandidate(int nodeDepth) |
String |
toString() |
protected int numArraysAdded
protected long lastNodeId
protected ArrayList<TokenizerNode> nodes
protected int numNodes
protected TokenizerNode root
protected byte[] tokens
protected int tokensLength
protected int maxElementLength
protected int treeDepth
protected static final Boolean INCLUDE_FULL_TREE_IN_TO_STRING
public void reset()
public void addSorted(ByteRange bytes)
public void incrementNumOccurrencesOfLatestValue()
protected long nextNodeId()
protected TokenizerNode addNode(TokenizerNode parent, int nodeDepth, int tokenStartOffset, ByteRange token, int inputTokenOffset)
protected int appendTokenAndRepointByteRange(ByteRange token, int inputTokenOffset)
protected void submitMaxNodeDepthCandidate(int nodeDepth)
public int getNumAdded()
public ArrayList<TokenizerNode> getNodes(boolean includeNonLeaves, boolean includeLeaves)
public void appendNodes(List<TokenizerNode> appendTo, boolean includeNonLeaves, boolean includeLeaves)
public List<byte[]> getArrays()
public void getNode(TokenizerRowSearchResult resultHolder, byte[] key, int keyOffset, int keyLength)
public Tokenizer setNodeFirstInsertionIndexes()
public String getStructuralString()
public TokenizerNode getRoot()
public int getMaxElementLength()
public int getTreeDepth()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.