- All Known Implementing Classes:
BaseChunkWriter
,BigDecimalChunkWriter
,BooleanChunkWriter
,ByteChunkWriter
,CharChunkWriter
,DoubleChunkWriter
,FixedWidthChunkWriter
,FixedWidthObjectChunkWriter
,FloatChunkWriter
,IntChunkWriter
,ListChunkWriter
,LongChunkWriter
,MapChunkWriter
,NullChunkWriter
,ShortChunkWriter
,UnionChunkWriter
,VarBinaryChunkWriter
The
ChunkWriter
interface provides a mechanism for writing chunks of data into a structured format suitable
for transmission in Apache Arrow's columnar format. It enables efficient handling of chunked data, including support
for various data types and logical structures. This interface is part of the Deephaven Barrage extensions for
efficient data streaming and processing.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
static class
static class
static interface
Creator ofChunkWriter
instances.static final class
static interface
-
Method Summary
Modifier and TypeMethodDescriptiongetEmptyInputStream
(@NotNull BarrageOptions options) Get an input stream representing the empty wire payload for this writer.getInputStream
(@NotNull ChunkWriter.Context context, @Nullable RowSet subset, @NotNull BarrageOptions options) Get an input stream optionally position-space filtered using the provided RowSet.boolean
makeContext
(SOURCE_CHUNK_TYPE chunk, long rowOffset) Create a context for the given chunk.
-
Method Details
-
makeContext
Create a context for the given chunk.- Parameters:
chunk
- the chunk of data to be writtenrowOffset
- the offset into the logical message potentially spread over multiple chunks- Returns:
- a context for the given chunk
-
getInputStream
ChunkWriter.DrainableColumn getInputStream(@NotNull @NotNull ChunkWriter.Context context, @Nullable @Nullable RowSet subset, @NotNull @NotNull BarrageOptions options) throws IOException Get an input stream optionally position-space filtered using the provided RowSet.- Parameters:
context
- the chunk writer context holding the data to be drained to the clientsubset
- if provided, is a position-space filter of source dataoptions
- options for writing to the stream- Returns:
- a single-use DrainableColumn ready to be drained via grpc
- Throws:
IOException
-
getEmptyInputStream
ChunkWriter.DrainableColumn getEmptyInputStream(@NotNull @NotNull BarrageOptions options) throws IOException Get an input stream representing the empty wire payload for this writer.- Parameters:
options
- options for writing to the stream- Returns:
- a single-use DrainableColumn ready to be drained via grpc
- Throws:
IOException
-
isFieldNullable
boolean isFieldNullable()- Returns:
- whether the wire format for this writer might include a validity buffer
-