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 Details

  • 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 column
      columnTypes - the class type per column
      componentTypes - the component class type per column
      destChunks - the destination chunks
      Returns:
      the client side method descriptor
    • stream

      public InputStream stream(Integer value)
      Specified by:
      stream in interface io.grpc.MethodDescriptor.Marshaller<Integer>
    • parse

      public Integer parse(InputStream stream)
      Specified by:
      parse in interface io.grpc.MethodDescriptor.Marshaller<Integer>