Class WriterImplV2

java.lang.Object
org.apache.orc.impl.WriterImpl
org.apache.orc.impl.writer.WriterImplV2
All Implemented Interfaces:
Closeable, AutoCloseable, WriterInternal, MemoryManager.Callback, Writer

public class WriterImplV2 extends WriterImpl
An ORCv2 file writer. The file is divided into stripes, which is the natural unit of work when reading. Each stripe is buffered in memory until the memory reaches the stripe size and then it is written out broken down by columns. Each column is written by a TreeWriter that is specific to that type of column. TreeWriters may have children TreeWriters that handle the sub-types. Each of the TreeWriters writes the column's data as a set of streams.

This class is unsynchronized like most Stream objects, so from the creation of an OrcFile and all access to a single instance has to be from a single thread.

There are no known cases where these happen between different threads today.

Caveat: the MemoryManager is created during WriterOptions create, that has to be confined to a single thread as well.