public class FallbackValuesWriter<I extends ValuesWriter & RequiresFallback,F extends ValuesWriter> extends ValuesWriter
| Modifier and Type | Field and Description |
|---|---|
F |
fallBackWriter
fallback
|
I |
initialWriter
writer to start with
|
| Constructor and Description |
|---|
FallbackValuesWriter(I initialWriter,
F fallBackWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called to close the values writer.
|
long |
getAllocatedSize()
|
long |
getBufferedSize()
used to decide if we want to work to the next page
|
BytesInput |
getBytes() |
Encoding |
getEncoding()
called after getBytes() and before reset()
|
String |
memUsageString(String prefix) |
static <I extends ValuesWriter & RequiresFallback,F extends ValuesWriter> |
of(I initialWriter,
F fallBackWriter) |
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
|
DictionaryPage |
toDictPageAndClose()
Returns the dictionary generated by this writer if one was created.
|
void |
writeByte(int value) |
void |
writeBytes(Binary v) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInteger(int v) |
void |
writeLong(long v) |
writeBooleanpublic final I extends ValuesWriter & RequiresFallback initialWriter
public final F extends ValuesWriter fallBackWriter
public static <I extends ValuesWriter & RequiresFallback,F extends ValuesWriter> FallbackValuesWriter<I,F> of(I initialWriter, F fallBackWriter)
public long getBufferedSize()
ValuesWritergetBufferedSize in class ValuesWriterpublic BytesInput getBytes()
getBytes in class ValuesWriterpublic Encoding getEncoding()
ValuesWritergetEncoding in class ValuesWriterpublic void reset()
ValuesWriterreset in class ValuesWriterpublic void close()
ValuesWriterclose in interface AutoCloseableclose in class ValuesWriterpublic DictionaryPage toDictPageAndClose()
ValuesWritertoDictPageAndClose in class ValuesWriterpublic void resetDictionary()
ValuesWriterresetDictionary in class ValuesWriterpublic long getAllocatedSize()
ValuesWritergetAllocatedSize in class ValuesWriterpublic String memUsageString(String prefix)
memUsageString in class ValuesWriterpublic void writeByte(int value)
writeByte in class ValuesWritervalue - the value to encodepublic void writeBytes(Binary v)
writeBytes in class ValuesWriterv - the value to encodepublic void writeInteger(int v)
writeInteger in class ValuesWriterv - the value to encodepublic void writeLong(long v)
writeLong in class ValuesWriterv - the value to encodepublic void writeFloat(float v)
writeFloat in class ValuesWriterv - the value to encodepublic void writeDouble(double v)
writeDouble in class ValuesWriterv - the value to encodeCopyright © 2024 The Apache Software Foundation. All rights reserved.