public abstract class DictionaryValuesWriter extends ValuesWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
DictionaryValuesWriter.PlainBinaryDictionaryValuesWriter |
static class |
DictionaryValuesWriter.PlainDoubleDictionaryValuesWriter |
static class |
DictionaryValuesWriter.PlainFloatDictionaryValuesWriter |
static class |
DictionaryValuesWriter.PlainIntegerDictionaryValuesWriter |
static class |
DictionaryValuesWriter.PlainLongDictionaryValuesWriter |
| Modifier and Type | Field and Description |
|---|---|
protected int |
dictionaryByteSize |
protected boolean |
dictionaryTooBig |
protected IntList |
encodedValues |
protected int |
lastUsedDictionaryByteSize |
protected int |
lastUsedDictionarySize |
protected int |
maxDictionaryByteSize |
protected PlainValuesWriter |
plainValuesWriter |
| Modifier | Constructor and Description |
|---|---|
protected |
DictionaryValuesWriter(int maxDictionaryByteSize,
int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndFallbackIfNeeded() |
protected abstract void |
clearDictionaryContent()
clear/free the underlying dictionary content
|
long |
getAllocatedSize() |
long |
getBufferedSize()
used to decide if we want to work to the next page
|
BytesInput |
getBytes() |
protected abstract int |
getDictionarySize() |
Encoding |
getEncoding()
called after getBytes() and before reset()
|
String |
memUsageString(String prefix) |
void |
reset()
called after getBytes() to reset the current buffer and start writing the next page
|
void |
resetDictionary()
reset the dictionary when a new block starts
|
createDictionaryPage, writeBoolean, writeByte, writeBytes, writeDouble, writeFloat, writeInteger, writeLongprotected final int maxDictionaryByteSize
protected final PlainValuesWriter plainValuesWriter
protected boolean dictionaryTooBig
protected int dictionaryByteSize
protected int lastUsedDictionaryByteSize
protected int lastUsedDictionarySize
protected IntList encodedValues
protected DictionaryValuesWriter(int maxDictionaryByteSize,
int initialSize)
protected void checkAndFallbackIfNeeded()
public long getBufferedSize()
ValuesWritergetBufferedSize in class ValuesWriterpublic long getAllocatedSize()
getAllocatedSize in class ValuesWriterpublic BytesInput getBytes()
getBytes in class ValuesWriterpublic Encoding getEncoding()
ValuesWritergetEncoding in class ValuesWriterpublic void reset()
ValuesWriterreset in class ValuesWriterpublic void resetDictionary()
ValuesWriterresetDictionary in class ValuesWriterprotected abstract void clearDictionaryContent()
protected abstract int getDictionarySize()
public String memUsageString(String prefix)
memUsageString in class ValuesWriterCopyright © 2013. All Rights Reserved.