Class BarrageChunkAppendingMarshaller
java.lang.Object
io.deephaven.extensions.barrage.util.BarrageChunkAppendingMarshaller
- All Implemented Interfaces:
io.grpc.MethodDescriptor.Marshaller<Integer>
public class BarrageChunkAppendingMarshaller
extends Object
implements io.grpc.MethodDescriptor.Marshaller<Integer>
This class is used to append the results of a DoGet directly into destination
WritableChunk<Values>.
It will append the results of a DoGet into the destination chunks, and notify the listener of the number of rows appended to the record batch in total. The user will typically want to wait for OnCompletion to be called before assuming they have received all the data.
-
Constructor Summary
ConstructorsConstructorDescriptionBarrageChunkAppendingMarshaller(BarrageSnapshotOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, WritableChunk<Values>[] destChunks) -
Method Summary
Modifier and TypeMethodDescriptionstatic io.grpc.MethodDescriptor<org.apache.arrow.flight.impl.Flight.Ticket,Integer> getClientDoGetDescriptor(ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, WritableChunk<Values>[] destChunks) Fetch the client side descriptor for a specific DoGet invocation.parse(InputStream stream)
-
Constructor Details
-
BarrageChunkAppendingMarshaller
public BarrageChunkAppendingMarshaller(BarrageSnapshotOptions options, ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, WritableChunk<Values>[] destChunks)
-
-
Method Details
-
getClientDoGetDescriptor
public static io.grpc.MethodDescriptor<org.apache.arrow.flight.impl.Flight.Ticket,Integer> getClientDoGetDescriptor(ChunkType[] columnChunkTypes, Class<?>[] columnTypes, Class<?>[] componentTypes, WritableChunk<Values>[] destChunks) Fetch the client side descriptor for a specific DoGet invocation.Instead of providing BarrageMessage as the response type, this custom marshaller will return the number of rows appended after each RecordBatch. This is informative yet hands-off process reading data into the chunks.
- Parameters:
columnChunkTypes- the chunk types per columncolumnTypes- the class type per columncomponentTypes- the component class type per columndestChunks- the destination chunks- Returns:
- the client side method descriptor
-
stream
- Specified by:
streamin interfaceio.grpc.MethodDescriptor.Marshaller<Integer>
-
parse
- Specified by:
parsein interfaceio.grpc.MethodDescriptor.Marshaller<Integer>
-