public abstract class ValuesWriter extends Object implements AutoCloseable
Constructor and Description |
---|
ValuesWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called to close the values writer.
|
abstract long |
getAllocatedSize()
( >
getBufferedSize() ) |
abstract long |
getBufferedSize()
used to decide if we want to work to the next page
|
abstract BytesInput |
getBytes() |
abstract Encoding |
getEncoding()
called after getBytes() and before reset()
|
abstract String |
memUsageString(String prefix) |
abstract 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 |
writeBoolean(boolean v) |
void |
writeByte(int value) |
void |
writeBytes(Binary v) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInteger(int v) |
void |
writeLong(long v) |
public abstract long getBufferedSize()
public abstract BytesInput getBytes()
public abstract Encoding getEncoding()
public abstract void reset()
public void close()
close
in interface AutoCloseable
public DictionaryPage toDictPageAndClose()
public void resetDictionary()
public abstract long getAllocatedSize()
getBufferedSize()
)public void writeByte(int value)
value
- the value to encodepublic void writeBoolean(boolean v)
v
- the value to encodepublic void writeBytes(Binary v)
v
- the value to encodepublic void writeInteger(int v)
v
- the value to encodepublic void writeLong(long v)
v
- the value to encodepublic void writeDouble(double v)
v
- the value to encodepublic void writeFloat(float v)
v
- the value to encodeCopyright © 2023 The Apache Software Foundation. All rights reserved.