Class BarrageUtil
java.lang.Object
io.deephaven.extensions.barrage.util.BarrageUtil
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BarrageSnapshotOptions
static final long
static final long
static final long
static final org.apache.arrow.vector.types.pojo.ArrowType.Timestamp
Note that arrow's wire format states that Timestamps without timezones are not UTC -- that they are no timezone at all.static final String
The name of the attribute that indicates that a table is flat.static final double
-
Constructor Summary
-
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 TableDefinition
static void
createAndSendSnapshot
(BarrageStreamGenerator.Factory streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGenerator.MessageView> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) static void
createAndSendStaticSnapshot
(BarrageStreamGenerator.Factory streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGenerator.MessageView> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) static org.apache.arrow.vector.types.pojo.Schema
makeSchema
(@NotNull StreamReaderOptions options, @NotNull TableDefinition tableDefinition, @NotNull Map<String, Object> attributes, boolean isFlat) static int
makeTableSchemaPayload
(@NotNull com.google.flatbuffers.FlatBufferBuilder builder, @NotNull StreamReaderOptions options, @NotNull TableDefinition tableDefinition, @NotNull Map<String, Object> attributes, boolean isFlat) static void
static com.google.protobuf.ByteString
schemaBytes
(@NotNull ToIntFunction<com.google.flatbuffers.FlatBufferBuilder> schemaPayloadWriter) static com.google.protobuf.ByteString
schemaBytesFromTable
(@NotNull Table table) static com.google.protobuf.ByteString
schemaBytesFromTableDefinition
(@NotNull TableDefinition tableDefinition, @NotNull Map<String, Object> attributes, boolean isFlat) static org.apache.arrow.vector.types.pojo.Schema
schemaFromTable
(@NotNull Table table) static org.apache.arrow.vector.types.pojo.Schema
toSchema
(TableDefinition definition, 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 -
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) -
schemaFromTable
public static org.apache.arrow.vector.types.pojo.Schema schemaFromTable(@NotNull @NotNull Table table) -
toSchema
public static org.apache.arrow.vector.types.pojo.Schema toSchema(TableDefinition definition, 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) -
makeSchema
public static org.apache.arrow.vector.types.pojo.Schema makeSchema(@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 streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGenerator.MessageView> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics) -
createAndSendSnapshot
public static void createAndSendSnapshot(BarrageStreamGenerator.Factory streamGeneratorFactory, BaseTable<?> table, BitSet columns, RowSet viewport, boolean reverseViewport, BarrageSnapshotOptions snapshotRequestOptions, io.grpc.stub.StreamObserver<BarrageStreamGenerator.MessageView> listener, BarragePerformanceLog.SnapshotMetricsHelper metrics)
-