org.apache.hadoop.hbase.codec.prefixtree.encode.row
Class RowSectionWriter

java.lang.Object
  extended by org.apache.hadoop.hbase.codec.prefixtree.encode.row.RowSectionWriter

@InterfaceAudience.Private
public class RowSectionWriter
extends Object

Most of the complexity of the PrefixTree is contained in the "row section". It contains the row key trie structure used to search and recreate all the row keys. Each nub and leaf in this trie also contains references to offsets in the other sections of the data block that enable the decoder to match a row key with its qualifier, timestamp, type, value, etc.

The row section is a concatenated collection of RowNodeWriters. See that class for the internals of each row node.


Field Summary
protected  PrefixTreeBlockMeta blockMeta
           
protected  ArrayList<RowNodeWriter> leafWriters
           
protected  ArrayList<TokenizerNode> leaves
           
protected  ArrayList<RowNodeWriter> nonLeafWriters
           
protected  ArrayList<TokenizerNode> nonLeaves
           
protected  int numBytes
           
protected  int numLeafWriters
           
protected  int numNonLeafWriters
           
protected  PrefixTreeEncoder prefixTreeEncoder
          fields
 
Constructor Summary
RowSectionWriter()
          construct
RowSectionWriter(PrefixTreeEncoder prefixTreeEncoder)
           
 
Method Summary
 RowSectionWriter compile()
          methods
protected static ArrayList<TokenizerNode> filterByLeafAndReverse(ArrayList<TokenizerNode> ins, boolean leaves)
          static
 ArrayList<RowNodeWriter> getLeafWriters()
           
 ArrayList<TokenizerNode> getLeaves()
           
 ArrayList<RowNodeWriter> getNonLeafWriters()
           
 ArrayList<TokenizerNode> getNonLeaves()
           
 int getNumBytes()
          get/set
protected  RowNodeWriter initializeWriter(List<RowNodeWriter> list, int index, TokenizerNode builderNode)
           
 void reconstruct(PrefixTreeEncoder prefixTreeEncoder)
           
 void reset()
           
 void writeBytes(OutputStream os)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefixTreeEncoder

protected PrefixTreeEncoder prefixTreeEncoder
fields


blockMeta

protected PrefixTreeBlockMeta blockMeta

numBytes

protected int numBytes

nonLeaves

protected ArrayList<TokenizerNode> nonLeaves

leaves

protected ArrayList<TokenizerNode> leaves

leafWriters

protected ArrayList<RowNodeWriter> leafWriters

nonLeafWriters

protected ArrayList<RowNodeWriter> nonLeafWriters

numLeafWriters

protected int numLeafWriters

numNonLeafWriters

protected int numNonLeafWriters
Constructor Detail

RowSectionWriter

public RowSectionWriter()
construct


RowSectionWriter

public RowSectionWriter(PrefixTreeEncoder prefixTreeEncoder)
Method Detail

reconstruct

public void reconstruct(PrefixTreeEncoder prefixTreeEncoder)

reset

public void reset()

compile

public RowSectionWriter compile()
methods


initializeWriter

protected RowNodeWriter initializeWriter(List<RowNodeWriter> list,
                                         int index,
                                         TokenizerNode builderNode)

writeBytes

public void writeBytes(OutputStream os)
                throws IOException
Throws:
IOException

filterByLeafAndReverse

protected static ArrayList<TokenizerNode> filterByLeafAndReverse(ArrayList<TokenizerNode> ins,
                                                                 boolean leaves)
static


getNumBytes

public int getNumBytes()
get/set


getNonLeaves

public ArrayList<TokenizerNode> getNonLeaves()

getLeaves

public ArrayList<TokenizerNode> getLeaves()

getNonLeafWriters

public ArrayList<RowNodeWriter> getNonLeafWriters()

getLeafWriters

public ArrayList<RowNodeWriter> getLeafWriters()


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.