Class BarrageUtil
java.lang.Object
io.deephaven.extensions.barrage.util.BarrageUtil
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BarrageSnapshotOptionsstatic final longstatic final org.apache.arrow.vector.types.pojo.ArrowType.FixedSizeBinarystatic final org.apache.arrow.vector.types.pojo.ArrowType.FixedSizeBinarystatic final longstatic final longstatic final org.apache.arrow.vector.types.pojo.ArrowType.TimestampNote that arrow's wire format states that Timestamps without timezones are not UTC -- that they are no timezone at all.static final StringThe name of the attribute that indicates that a table is flat.static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributesToMetadata(@NotNull Map<String, Object> attributes) attributesToMetadata(@NotNull Map<String, Object> attributes, boolean isFlat) static Stream<org.apache.arrow.vector.types.pojo.Field>columnDefinitionsToFields(@NotNull Map<String, String> columnDescriptions, @Nullable InputTableUpdater inputTableUpdater, @NotNull TableDefinition tableDefinition, @NotNull Collection<ColumnDefinition<?>> columnDefinitions, @NotNull Function<String, Map<String, String>> fieldMetadataFactory, @NotNull Map<String, Object> attributes) static Stream<org.apache.arrow.vector.types.pojo.Field>columnDefinitionsToFields(@NotNull Map<String, String> columnDescriptions, @Nullable InputTableUpdater inputTableUpdater, @NotNull TableDefinition tableDefinition, @NotNull Collection<ColumnDefinition<?>> columnDefinitions, @NotNull Function<String, Map<String, String>> fieldMetadataFactory, @NotNull Map<String, Object> attributes, boolean columnsAsList) convertArrowSchema(org.apache.arrow.flatbuf.Schema schema) convertArrowSchema(org.apache.arrow.vector.types.pojo.Schema schema) static TableDefinitionstatic voidcreateAndSendSnapshot(BarrageStreamGenerator.Factory<BarrageStreamGeneratorImpl.View> streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGeneratorImpl.View> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) static voidcreateAndSendStaticSnapshot(BarrageStreamGenerator.Factory<BarrageStreamGeneratorImpl.View> streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGeneratorImpl.View> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) static intmakeTableSchemaPayload(@NotNull com.google.flatbuffers.FlatBufferBuilder builder, @NotNull StreamReaderOptions options, @NotNull TableDefinition tableDefinition, @NotNull Map<String, Object> attributes, boolean isFlat) static voidstatic com.google.protobuf.ByteStringschemaBytes(@NotNull ToIntFunction<com.google.flatbuffers.FlatBufferBuilder> schemaPayloadWriter) static com.google.protobuf.ByteStringschemaBytesFromTable(@NotNull Table table) static com.google.protobuf.ByteStringschemaBytesFromTableDefinition(@NotNull TableDefinition tableDefinition, @NotNull Map<String, Object> attributes, boolean isFlat)
-
Field Details
-
DEFAULT_SNAPSHOT_DESER_OPTIONS
-
FLATBUFFER_MAGIC
public static final long FLATBUFFER_MAGIC- See Also:
-
TARGET_SNAPSHOT_PERCENTAGE
public static final double TARGET_SNAPSHOT_PERCENTAGE -
MIN_SNAPSHOT_CELL_COUNT
public static final long MIN_SNAPSHOT_CELL_COUNT -
MAX_SNAPSHOT_CELL_COUNT
public static final long MAX_SNAPSHOT_CELL_COUNT -
LOCAL_DATE_TYPE
public static final org.apache.arrow.vector.types.pojo.ArrowType.FixedSizeBinary LOCAL_DATE_TYPE -
LOCAL_TIME_TYPE
public static final org.apache.arrow.vector.types.pojo.ArrowType.FixedSizeBinary LOCAL_TIME_TYPE -
NANO_SINCE_EPOCH_TYPE
public static final org.apache.arrow.vector.types.pojo.ArrowType.Timestamp NANO_SINCE_EPOCH_TYPENote that arrow's wire format states that Timestamps without timezones are not UTC -- that they are no timezone at all. It's very important that we mark these times as UTC. -
TABLE_ATTRIBUTE_IS_FLAT
The name of the attribute that indicates that a table is flat.- See Also:
-
-
Constructor Details
-
BarrageUtil
public BarrageUtil()
-
-
Method Details
-
schemaBytesFromTable
-
schemaBytesFromTableDefinition
public static com.google.protobuf.ByteString schemaBytesFromTableDefinition(@NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull Map<String, Object> attributes, boolean isFlat) -
schemaBytes
public static com.google.protobuf.ByteString schemaBytes(@NotNull @NotNull ToIntFunction<com.google.flatbuffers.FlatBufferBuilder> schemaPayloadWriter) -
makeTableSchemaPayload
public static int makeTableSchemaPayload(@NotNull @NotNull com.google.flatbuffers.FlatBufferBuilder builder, @NotNull @NotNull StreamReaderOptions options, @NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull Map<String, Object> attributes, boolean isFlat) -
attributesToMetadata
-
attributesToMetadata
-
columnDefinitionsToFields
public static Stream<org.apache.arrow.vector.types.pojo.Field> columnDefinitionsToFields(@NotNull @NotNull Map<String, String> columnDescriptions, @Nullable @Nullable InputTableUpdater inputTableUpdater, @NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull Collection<ColumnDefinition<?>> columnDefinitions, @NotNull @NotNull Function<String, Map<String, String>> fieldMetadataFactory, @NotNull @NotNull Map<String, Object> attributes) -
columnDefinitionsToFields
public static Stream<org.apache.arrow.vector.types.pojo.Field> columnDefinitionsToFields(@NotNull @NotNull Map<String, String> columnDescriptions, @Nullable @Nullable InputTableUpdater inputTableUpdater, @NotNull @NotNull TableDefinition tableDefinition, @NotNull @NotNull Collection<ColumnDefinition<?>> columnDefinitions, @NotNull @NotNull Function<String, Map<String, String>> fieldMetadataFactory, @NotNull @NotNull Map<String, Object> attributes, boolean columnsAsList) -
putMetadata
-
convertTableDefinition
-
convertArrowSchema
public static BarrageUtil.ConvertedArrowSchema convertArrowSchema(ExportedTableCreationResponse response) -
convertArrowSchema
public static BarrageUtil.ConvertedArrowSchema convertArrowSchema(org.apache.arrow.flatbuf.Schema schema) -
convertArrowSchema
public static BarrageUtil.ConvertedArrowSchema convertArrowSchema(org.apache.arrow.vector.types.pojo.Schema schema) -
createAndSendStaticSnapshot
public static void createAndSendStaticSnapshot(BarrageStreamGenerator.Factory<BarrageStreamGeneratorImpl.View> streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGeneratorImpl.View> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) -
createAndSendSnapshot
public static void createAndSendSnapshot(BarrageStreamGenerator.Factory<BarrageStreamGeneratorImpl.View> streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGeneratorImpl.View> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics)
-