public class WriterImpl extends Object implements Writer, MemoryManager.Callback
| Modifier and Type | Field and Description |
|---|---|
static long |
BASE_TIMESTAMP |
static int |
COMPRESSED_PRESENT_STREAM_INDEX_ENTRIES |
static int |
INT_BYTE_SIZE |
static int |
LONG_BYTE_SIZE |
static int |
MILLIS_PER_SECOND |
static int |
SHORT_BYTE_SIZE |
static int |
UNCOMPRESSED_PRESENT_STREAM_INDEX_ENTRIES |
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(Object row)
Add a row to the ORC file.
|
void |
addStripe(StripeInformation si,
byte[] data) |
void |
addUserMetadata(String name,
ByteBuffer value)
Add arbitrary meta-data to the ORC file.
|
boolean |
checkMemory(double newScale)
The writer needs to check its memory usage
|
void |
close()
Flush all of the buffers and close the file.
|
void |
close(ColumnStatisticsImpl[] columnStats) |
void |
enterLowMemoryMode()
If the initial amount of memory needed by a writer is greater than the amount allocated,
call this to try to get the writers to use less memory to avoid an OOM
|
long |
getRowRawDataSize()
Get the raw data size of the last row added
|
public static final int SHORT_BYTE_SIZE
public static final int INT_BYTE_SIZE
public static final int LONG_BYTE_SIZE
public static final int UNCOMPRESSED_PRESENT_STREAM_INDEX_ENTRIES
public static final int COMPRESSED_PRESENT_STREAM_INDEX_ENTRIES
public static final int MILLIS_PER_SECOND
public static final long BASE_TIMESTAMP
public void enterLowMemoryMode()
throws IOException
MemoryManager.CallbackenterLowMemoryMode in interface MemoryManager.CallbackIOExceptionpublic boolean checkMemory(double newScale)
throws IOException
MemoryManager.CallbackcheckMemory in interface MemoryManager.CallbacknewScale - the current scale factor for memory allocationsIOExceptionpublic void addStripe(StripeInformation si, byte[] data) throws IOException
IOExceptionpublic void addUserMetadata(String name, ByteBuffer value)
WriteraddUserMetadata in interface Writername - a key to label the data with.value - the contents of the metadata.public void addRow(Object row) throws IOException
WriteraddRow in interface Writerrow - the row to addIOExceptionpublic long getRowRawDataSize()
WritergetRowRawDataSize in interface Writerpublic void close()
throws IOException
Writerclose in interface WriterIOExceptionpublic void close(ColumnStatisticsImpl[] columnStats) throws IOException
IOExceptionCopyright © 2013–2021. All rights reserved.