From 6cc2dfd56d5442101abb70e6a7bcef1a04bbf0c7 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 4 Nov 2024 16:33:54 -0700 Subject: [PATCH 01/11] Barrage: Version Bumps, Feat Deprecation, New Feat Flags --- format/Barrage.fbs | 62 +++++++++++++++------------------------ java/barrage-core/pom.xml | 6 ++-- java/format/pom.xml | 4 +-- java/pom.xml | 6 ++-- javascript/package.json | 2 +- 5 files changed, 32 insertions(+), 48 deletions(-) diff --git a/format/Barrage.fbs b/format/Barrage.fbs index b43b1f3..a587791 100644 --- a/format/Barrage.fbs +++ b/format/Barrage.fbs @@ -19,10 +19,7 @@ enum BarrageMessageType : byte { /// if the msg_payload is empty. None = 0, - /// for session management (not-yet-used) - NewSessionRequest = 1, - RefreshSessionRequest = 2, - SessionInfoResponse = 3, + /// enum values 1 - 3 are reserved for future use /// for subscription parsing/management (aka DoPut, DoExchange) BarrageSerializationOptions = 4, @@ -47,42 +44,13 @@ table BarrageMessageWrapper { msg_payload: [byte]; } -/// Establish a new session. -table NewSessionRequest { - /// A nested protocol version (gets delegated to handshake) - protocol_version: uint; - - /// Arbitrary auth/handshake info. - payload: [byte]; -} - -/// Refresh the provided session. -table RefreshSessionRequest { - /// this session token is only required if it is the first request of a handshake rpc stream - session: [byte]; -} - -/// Information about the current session state. -table SessionInfoResponse { - /// this is the metadata header to identify this session with future requests; it must be lower-case and remain static for the life of the session - metadata_header: [byte]; - - /// this is the session_token; note that it may rotate - session_token: [byte]; - - /// a suggested time for the user to refresh the session if they do not do so earlier; value is denoted in milliseconds since epoch - token_refresh_deadline_ms: long; -} - -/// There will always be types that cannot be easily supported over IPC. These are the options: -/// Stringify (default) - Pretend the column is a string when sending over Arrow Flight (default) -/// JavaSerialization - Use java serialization; the client is responsible for the deserialization -/// ThrowError - Refuse to send the column and throw an internal error sharing as much detail as possible +/// There will always be types that cannot be easily supported over IPC. While column conversion mode is no longer +/// supported, users can more explicitly configure the encoding/decoding behavior of the server. enum ColumnConversionMode : byte { Stringify = 1, JavaSerialization, ThrowError } table BarrageSubscriptionOptions { - /// see enum for details - column_conversion_mode: ColumnConversionMode = Stringify; + /// Column conversion mode is no longer supported. + column_conversion_mode: ColumnConversionMode = Stringify (deprecated); /// Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission /// by eliminating the additional complexity of the validity buffer. @@ -109,6 +77,12 @@ table BarrageSubscriptionOptions { /// If true, the server will wrap columns with a list. This is useful for clients that do not support modified batches /// with columns of differing lengths. columns_as_list: bool; + + /// If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded + /// list / array to the first n elements, where n is the specified value. If the column value has length less than + /// zero, the server will send the last n elements of the list / array. If the column value has length greater than + /// the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + preview_list_length_limit: int = 0; } /// Describes the subscription the client would like to acquire. @@ -129,11 +103,15 @@ table BarrageSubscriptionRequest { /// When this is set the viewport RowSet will be inverted against the length of the table. That is to say /// every position value is converted from `i` to `n - i - 1` if the table has `n` rows. reverse_viewport: bool; + + /// If this is set, the server will parrot this subscription token in the response. This token can be used to identify + /// which subscription the server is now respecting. + subscription_token: [byte]; } table BarrageSnapshotOptions { - /// see enum for details - column_conversion_mode: ColumnConversionMode = Stringify; + /// Column conversion mode is no longer supported. + column_conversion_mode: ColumnConversionMode = Stringify (deprecated); /// Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission /// by eliminating the additional complexity of the validity buffer. @@ -148,6 +126,12 @@ table BarrageSnapshotOptions { /// of one row per batch). If the message size limit cannot be met due to large row sizes, the server will throw a /// `Status.RESOURCE_EXHAUSTED` exception max_message_size: int; + + /// If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded + /// list / array to the first n elements, where n is the specified value. If the column value has length less than + /// zero, the server will send the last n elements of the list / array. If the column value has length greater than + /// the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + preview_list_length_limit: int = 0; } /// Describes the snapshot the client would like to acquire. diff --git a/java/barrage-core/pom.xml b/java/barrage-core/pom.xml index d3a29a4..e85634d 100644 --- a/java/barrage-core/pom.xml +++ b/java/barrage-core/pom.xml @@ -19,7 +19,7 @@ io.deephaven.barrage barrage-java-root - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT ../pom.xml @@ -29,8 +29,8 @@ jar - 1.58.0 - 3.21.9 + 1.65.0 + 3.25.4 1 diff --git a/java/format/pom.xml b/java/format/pom.xml index 1d79664..72b1108 100644 --- a/java/format/pom.xml +++ b/java/format/pom.xml @@ -20,7 +20,7 @@ barrage-java-root io.deephaven.barrage - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT barrage-format @@ -119,7 +119,7 @@ com.mycila license-maven-plugin - 2.3 + 4.6
${basedir}/../../header
diff --git a/java/pom.xml b/java/pom.xml index 19f0257..5896abc 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -25,7 +25,7 @@ io.deephaven.barrage barrage-java-root - 0.6.1-SNAPSHOT + 0.7.0-SNAPSHOT pom Deephaven Data Labs' Barrage Java Root POM @@ -34,9 +34,9 @@ ${project.basedir}/target/generated-sources - 1.12.0 + 24.3.25 1.12.0 - 5.0.0 + 18.0.0 2 9+181-r4173-1 diff --git a/javascript/package.json b/javascript/package.json index 8c40ddc..9f1e4aa 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@deephaven/barrage", - "version": "0.6.1-snapshot.0", + "version": "0.7.0-snapshot.0", "description": "Deephaven Barrage protocol", "main": "dist/barrage.js", "types": "dist/typings/index.d.ts", From 699da105ad4718e2f3da059f418b6c15a7c29038 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 4 Nov 2024 16:57:47 -0700 Subject: [PATCH 02/11] Generate java flatbuffer results and add to repository --- java/format/README.md | 32 +++ java/format/pom.xml | 122 ----------- .../barrage/flatbuf/BarrageMessageType.java | 40 ++++ .../flatbuf/BarrageMessageWrapper.java | 95 +++++++++ .../flatbuf/BarrageModColumnMetadata.java | 81 +++++++ .../flatbuf/BarragePublicationOptions.java | 70 ++++++ .../flatbuf/BarragePublicationRequest.java | 90 ++++++++ .../flatbuf/BarrageSnapshotOptions.java | 98 +++++++++ .../flatbuf/BarrageSnapshotRequest.java | 127 +++++++++++ .../flatbuf/BarrageSubscriptionOptions.java | 118 +++++++++++ .../flatbuf/BarrageSubscriptionRequest.java | 143 +++++++++++++ .../flatbuf/BarrageUpdateMetadata.java | 200 ++++++++++++++++++ .../barrage/flatbuf/ColumnConversionMode.java | 33 +++ java/pom.xml | 1 - 14 files changed, 1127 insertions(+), 123 deletions(-) create mode 100644 java/format/README.md create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java create mode 100644 java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java diff --git a/java/format/README.md b/java/format/README.md new file mode 100644 index 0000000..c4aadb4 --- /dev/null +++ b/java/format/README.md @@ -0,0 +1,32 @@ +### Updating the flatbuffers generated code + +1. Verify that your version of flatc matches the declared dependency: + +```bash +$ flatc --version +flatc version 24.3.25 +$ grep "dep.fbs.version" java/pom.xml + 1.12.0 +``` + +2. Generate the flatbuffer java files by performing the following: + +```bash +cd $BARRAGE_HOME +# remove the existing files +rm -rf java/format/src +# regenerate from the .fbs files +flatc --java -o java/format/src/main/java format/*.fbs +# prepend license header +find java/format/src -type f | while read file; do + (cat header | while read line; do echo "// $line"; done; cat $file) > $file.tmp + mv $file.tmp $file +done +``` + +3. Ensure any new files are added to the git repository: + +```bash +cd $BARRAGE_HOME +find java/format/src -type f | while read file; do git add $file; done +``` \ No newline at end of file diff --git a/java/format/pom.xml b/java/format/pom.xml index 72b1108..32df6e2 100644 --- a/java/format/pom.xml +++ b/java/format/pom.xml @@ -28,13 +28,6 @@ Barrage Format Generated Java files from the IPC Flatbuffer definitions. - - false - ${project.build.directory}/flatc-${os.detected.classifier}-${dep.flatc.version}.exe - ${project.build.directory}/generated-sources/flatc - 1.5.0.Final - - com.google.flatbuffers @@ -42,119 +35,4 @@ - - - - - kr.motd.maven - os-maven-plugin - ${os-maven-plugin.version} - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-flatc - initialize - - copy - - - - - com.github.shinanca - flatc-${os.detected.classifier} - ${dep.flatc.version} - exe - true - ${project.build.directory} - - - ${flatc.download.skip} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.4.0 - - - script-chmod - - exec - - generate-sources - - chmod - - +x - ${project.build.directory}/flatc-${os.detected.classifier}-${dep.flatc.version}.exe - - ${flatc.download.skip} - - - - - exec - - generate-sources - - ${flatc.executable} - - -j - -o - ${flatc.generated.files} - ../../format/Barrage.fbs - - - - - - - com.mycila - license-maven-plugin - 4.6 - -
${basedir}/../../header
- - **/*.java - -
- - - process-sources - - format - - - -
- - org.codehaus.mojo - build-helper-maven-plugin - 1.9.1 - - - add-generated-sources-to-classpath - generate-sources - - add-source - - - - ${flatc.generated.files} - - - - - -
- -
diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java new file mode 100644 index 0000000..110eb50 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java @@ -0,0 +1,40 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +@SuppressWarnings("unused") +public final class BarrageMessageType { + private BarrageMessageType() { } + /** + * A barrage message wrapper might send a None message type + * if the msg_payload is empty. + */ + public static final byte None = 0; + /** + * enum values 1 - 3 are reserved for future use + * for subscription parsing/management (aka DoPut, DoExchange) + */ + public static final byte BarrageSerializationOptions = 4; + public static final byte BarrageSubscriptionRequest = 5; + public static final byte BarrageUpdateMetadata = 6; + public static final byte BarrageSnapshotRequest = 7; + public static final byte BarragePublicationRequest = 8; + + public static final String[] names = { "None", "", "", "", "BarrageSerializationOptions", "BarrageSubscriptionRequest", "BarrageUpdateMetadata", "BarrageSnapshotRequest", "BarragePublicationRequest", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java new file mode 100644 index 0000000..2f02323 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java @@ -0,0 +1,95 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * The message wrapper used for all barrage app_metadata fields. + */ +@SuppressWarnings("unused") +public final class BarrageMessageWrapper extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageMessageWrapper getRootAsBarrageMessageWrapper(ByteBuffer _bb) { return getRootAsBarrageMessageWrapper(_bb, new BarrageMessageWrapper()); } + public static BarrageMessageWrapper getRootAsBarrageMessageWrapper(ByteBuffer _bb, BarrageMessageWrapper obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageMessageWrapper __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Used to identify this type of app_metadata vs other applications. + * The magic value is '0x6E687064'. It is the numerical representation of the ASCII "dphn". + */ + public long magic() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + /** + * The msg type being sent. + */ + public byte msgType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + /** + * The msg payload. + */ + public byte msgPayload(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int msgPayloadLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteVector msgPayloadVector() { return msgPayloadVector(new ByteVector()); } + public ByteVector msgPayloadVector(ByteVector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer msgPayloadAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer msgPayloadInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + + public static int createBarrageMessageWrapper(FlatBufferBuilder builder, + long magic, + byte msgType, + int msgPayloadOffset) { + builder.startTable(3); + BarrageMessageWrapper.addMsgPayload(builder, msgPayloadOffset); + BarrageMessageWrapper.addMagic(builder, magic); + BarrageMessageWrapper.addMsgType(builder, msgType); + return BarrageMessageWrapper.endBarrageMessageWrapper(builder); + } + + public static void startBarrageMessageWrapper(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addMagic(FlatBufferBuilder builder, long magic) { builder.addInt(0, (int) magic, (int) 0L); } + public static void addMsgType(FlatBufferBuilder builder, byte msgType) { builder.addByte(1, msgType, 0); } + public static void addMsgPayload(FlatBufferBuilder builder, int msgPayloadOffset) { builder.addOffset(2, msgPayloadOffset, 0); } + public static int createMsgPayloadVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createMsgPayloadVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startMsgPayloadVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBarrageMessageWrapper(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageMessageWrapper get(int j) { return get(new BarrageMessageWrapper(), j); } + public BarrageMessageWrapper get(BarrageMessageWrapper obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java new file mode 100644 index 0000000..f28e028 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java @@ -0,0 +1,81 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * Holds all of the rowset data structures for the column being modified. + */ +@SuppressWarnings("unused") +public final class BarrageModColumnMetadata extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageModColumnMetadata getRootAsBarrageModColumnMetadata(ByteBuffer _bb) { return getRootAsBarrageModColumnMetadata(_bb, new BarrageModColumnMetadata()); } + public static BarrageModColumnMetadata getRootAsBarrageModColumnMetadata(ByteBuffer _bb, BarrageModColumnMetadata obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageModColumnMetadata __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * This is an encoded and compressed RowSet for this column (within the viewport) that were modified. + * There is no notification for modifications outside of the viewport. + */ + public byte modifiedRows(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int modifiedRowsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector modifiedRowsVector() { return modifiedRowsVector(new ByteVector()); } + public ByteVector modifiedRowsVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer modifiedRowsAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer modifiedRowsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createBarrageModColumnMetadata(FlatBufferBuilder builder, + int modifiedRowsOffset) { + builder.startTable(1); + BarrageModColumnMetadata.addModifiedRows(builder, modifiedRowsOffset); + return BarrageModColumnMetadata.endBarrageModColumnMetadata(builder); + } + + public static void startBarrageModColumnMetadata(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addModifiedRows(FlatBufferBuilder builder, int modifiedRowsOffset) { builder.addOffset(0, modifiedRowsOffset, 0); } + public static int createModifiedRowsVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createModifiedRowsVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startModifiedRowsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBarrageModColumnMetadata(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageModColumnMetadata get(int j) { return get(new BarrageModColumnMetadata(), j); } + public BarrageModColumnMetadata get(BarrageModColumnMetadata obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java new file mode 100644 index 0000000..92cc82f --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java @@ -0,0 +1,70 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BarragePublicationOptions extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarragePublicationOptions getRootAsBarragePublicationOptions(ByteBuffer _bb) { return getRootAsBarragePublicationOptions(_bb, new BarragePublicationOptions()); } + public static BarragePublicationOptions getRootAsBarragePublicationOptions(ByteBuffer _bb, BarragePublicationOptions obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarragePublicationOptions __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission + * by eliminating the additional complexity of the validity buffer. + */ + public boolean useDeephavenNulls() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createBarragePublicationOptions(FlatBufferBuilder builder, + boolean useDeephavenNulls) { + builder.startTable(1); + BarragePublicationOptions.addUseDeephavenNulls(builder, useDeephavenNulls); + return BarragePublicationOptions.endBarragePublicationOptions(builder); + } + + public static void startBarragePublicationOptions(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addUseDeephavenNulls(FlatBufferBuilder builder, boolean useDeephavenNulls) { builder.addBoolean(0, useDeephavenNulls, false); } + public static int endBarragePublicationOptions(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarragePublicationOptions get(int j) { return get(new BarragePublicationOptions(), j); } + public BarragePublicationOptions get(BarragePublicationOptions obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java new file mode 100644 index 0000000..3b4ccb2 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java @@ -0,0 +1,90 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * Describes the table update stream the client would like to push to. This is similar to a DoPut but the client + * will send BarrageUpdateMetadata to explicitly describe the row key space. The updates sent adhere to the table + * update model semantics; thus BarragePublication enables the client to upload a ticking table. + */ +@SuppressWarnings("unused") +public final class BarragePublicationRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarragePublicationRequest getRootAsBarragePublicationRequest(ByteBuffer _bb) { return getRootAsBarragePublicationRequest(_bb, new BarragePublicationRequest()); } + public static BarragePublicationRequest getRootAsBarragePublicationRequest(ByteBuffer _bb, BarragePublicationRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarragePublicationRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * The destination Ticket. + */ + public byte ticket(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int ticketLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector ticketVector() { return ticketVector(new ByteVector()); } + public ByteVector ticketVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer ticketAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer ticketInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * Options to configure your request. + */ + public io.deephaven.barrage.flatbuf.BarragePublicationOptions publishOptions() { return publishOptions(new io.deephaven.barrage.flatbuf.BarragePublicationOptions()); } + public io.deephaven.barrage.flatbuf.BarragePublicationOptions publishOptions(io.deephaven.barrage.flatbuf.BarragePublicationOptions obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createBarragePublicationRequest(FlatBufferBuilder builder, + int ticketOffset, + int publishOptionsOffset) { + builder.startTable(2); + BarragePublicationRequest.addPublishOptions(builder, publishOptionsOffset); + BarragePublicationRequest.addTicket(builder, ticketOffset); + return BarragePublicationRequest.endBarragePublicationRequest(builder); + } + + public static void startBarragePublicationRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addTicket(FlatBufferBuilder builder, int ticketOffset) { builder.addOffset(0, ticketOffset, 0); } + public static int createTicketVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createTicketVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startTicketVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addPublishOptions(FlatBufferBuilder builder, int publishOptionsOffset) { builder.addOffset(1, publishOptionsOffset, 0); } + public static int endBarragePublicationRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarragePublicationRequest get(int j) { return get(new BarragePublicationRequest(), j); } + public BarragePublicationRequest get(BarragePublicationRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java new file mode 100644 index 0000000..7c6d598 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java @@ -0,0 +1,98 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BarrageSnapshotOptions extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageSnapshotOptions getRootAsBarrageSnapshotOptions(ByteBuffer _bb) { return getRootAsBarrageSnapshotOptions(_bb, new BarrageSnapshotOptions()); } + public static BarrageSnapshotOptions getRootAsBarrageSnapshotOptions(ByteBuffer _bb, BarrageSnapshotOptions obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageSnapshotOptions __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission + * by eliminating the additional complexity of the validity buffer. + */ + public boolean useDeephavenNulls() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Specify a preferred batch size. Server is allowed to be configured to restrict possible values. Too small of a + * batch size may be dominated with header costs as each batch is wrapped into a separate RecordBatch. Too large of + * a payload and it may not fit within the maximum payload size. A good default might be 4096. + */ + public int batchSize() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + /** + * Specify a maximum allowed message size. Server will enforce this limit by reducing batch size (to a lower limit + * of one row per batch). If the message size limit cannot be met due to large row sizes, the server will throw a + * `Status.RESOURCE_EXHAUSTED` exception + */ + public int maxMessageSize() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + /** + * If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded + * list / array to the first n elements, where n is the specified value. If the column value has length less than + * zero, the server will send the last n elements of the list / array. If the column value has length greater than + * the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + */ + public int previewListLengthLimit() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createBarrageSnapshotOptions(FlatBufferBuilder builder, + boolean useDeephavenNulls, + int batchSize, + int maxMessageSize, + int previewListLengthLimit) { + builder.startTable(5); + BarrageSnapshotOptions.addPreviewListLengthLimit(builder, previewListLengthLimit); + BarrageSnapshotOptions.addMaxMessageSize(builder, maxMessageSize); + BarrageSnapshotOptions.addBatchSize(builder, batchSize); + BarrageSnapshotOptions.addUseDeephavenNulls(builder, useDeephavenNulls); + return BarrageSnapshotOptions.endBarrageSnapshotOptions(builder); + } + + public static void startBarrageSnapshotOptions(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addUseDeephavenNulls(FlatBufferBuilder builder, boolean useDeephavenNulls) { builder.addBoolean(1, useDeephavenNulls, false); } + public static void addBatchSize(FlatBufferBuilder builder, int batchSize) { builder.addInt(2, batchSize, 0); } + public static void addMaxMessageSize(FlatBufferBuilder builder, int maxMessageSize) { builder.addInt(3, maxMessageSize, 0); } + public static void addPreviewListLengthLimit(FlatBufferBuilder builder, int previewListLengthLimit) { builder.addInt(4, previewListLengthLimit, 0); } + public static int endBarrageSnapshotOptions(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageSnapshotOptions get(int j) { return get(new BarrageSnapshotOptions(), j); } + public BarrageSnapshotOptions get(BarrageSnapshotOptions obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java new file mode 100644 index 0000000..724aa80 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java @@ -0,0 +1,127 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * Describes the snapshot the client would like to acquire. + */ +@SuppressWarnings("unused") +public final class BarrageSnapshotRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageSnapshotRequest getRootAsBarrageSnapshotRequest(ByteBuffer _bb) { return getRootAsBarrageSnapshotRequest(_bb, new BarrageSnapshotRequest()); } + public static BarrageSnapshotRequest getRootAsBarrageSnapshotRequest(ByteBuffer _bb, BarrageSnapshotRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageSnapshotRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Ticket for the source data set. + */ + public byte ticket(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int ticketLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector ticketVector() { return ticketVector(new ByteVector()); } + public ByteVector ticketVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer ticketAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer ticketInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * The bitset of columns to request. If not provided then all columns are requested. + */ + public byte columns(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int columnsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteVector columnsVector() { return columnsVector(new ByteVector()); } + public ByteVector columnsVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer columnsAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer columnsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * This is an encoded and compressed RowSet in position-space to subscribe to. If not provided then the entire + * table is requested. + */ + public byte viewport(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int viewportLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteVector viewportVector() { return viewportVector(new ByteVector()); } + public ByteVector viewportVector(ByteVector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer viewportAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer viewportInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + /** + * Options to configure your subscription. + */ + public io.deephaven.barrage.flatbuf.BarrageSnapshotOptions snapshotOptions() { return snapshotOptions(new io.deephaven.barrage.flatbuf.BarrageSnapshotOptions()); } + public io.deephaven.barrage.flatbuf.BarrageSnapshotOptions snapshotOptions(io.deephaven.barrage.flatbuf.BarrageSnapshotOptions obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * When this is set the viewport RowSet will be inverted against the length of the table. That is to say + * every position value is converted from `i` to `n - i - 1` if the table has `n` rows. + */ + public boolean reverseViewport() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createBarrageSnapshotRequest(FlatBufferBuilder builder, + int ticketOffset, + int columnsOffset, + int viewportOffset, + int snapshotOptionsOffset, + boolean reverseViewport) { + builder.startTable(5); + BarrageSnapshotRequest.addSnapshotOptions(builder, snapshotOptionsOffset); + BarrageSnapshotRequest.addViewport(builder, viewportOffset); + BarrageSnapshotRequest.addColumns(builder, columnsOffset); + BarrageSnapshotRequest.addTicket(builder, ticketOffset); + BarrageSnapshotRequest.addReverseViewport(builder, reverseViewport); + return BarrageSnapshotRequest.endBarrageSnapshotRequest(builder); + } + + public static void startBarrageSnapshotRequest(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addTicket(FlatBufferBuilder builder, int ticketOffset) { builder.addOffset(0, ticketOffset, 0); } + public static int createTicketVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createTicketVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startTicketVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addColumns(FlatBufferBuilder builder, int columnsOffset) { builder.addOffset(1, columnsOffset, 0); } + public static int createColumnsVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createColumnsVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startColumnsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addViewport(FlatBufferBuilder builder, int viewportOffset) { builder.addOffset(2, viewportOffset, 0); } + public static int createViewportVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createViewportVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startViewportVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addSnapshotOptions(FlatBufferBuilder builder, int snapshotOptionsOffset) { builder.addOffset(3, snapshotOptionsOffset, 0); } + public static void addReverseViewport(FlatBufferBuilder builder, boolean reverseViewport) { builder.addBoolean(4, reverseViewport, false); } + public static int endBarrageSnapshotRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageSnapshotRequest get(int j) { return get(new BarrageSnapshotRequest(), j); } + public BarrageSnapshotRequest get(BarrageSnapshotRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java new file mode 100644 index 0000000..2454ba3 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java @@ -0,0 +1,118 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BarrageSubscriptionOptions extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageSubscriptionOptions getRootAsBarrageSubscriptionOptions(ByteBuffer _bb) { return getRootAsBarrageSubscriptionOptions(_bb, new BarrageSubscriptionOptions()); } + public static BarrageSubscriptionOptions getRootAsBarrageSubscriptionOptions(ByteBuffer _bb, BarrageSubscriptionOptions obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageSubscriptionOptions __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission + * by eliminating the additional complexity of the validity buffer. + */ + public boolean useDeephavenNulls() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * Explicitly set the update interval for this subscription. Note that subscriptions with different update intervals + * cannot share intermediary state with other subscriptions and greatly increases the footprint of the non-conforming subscription. + * + * Note: if not supplied (default of zero) then the server uses a consistent value to be efficient and fair to all clients + */ + public int minUpdateIntervalMs() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + /** + * Specify a preferred batch size. Server is allowed to be configured to restrict possible values. Too small of a + * batch size may be dominated with header costs as each batch is wrapped into a separate RecordBatch. Too large of + * a payload and it may not fit within the maximum payload size. A good default might be 4096. + * + * a batch_size of -1 indicates that the server should avoid batching a single logical message + */ + public int batchSize() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + /** + * Specify a maximum allowed message size. Server will enforce this limit by reducing batch size (to a lower limit + * of one row per batch). If the message size limit cannot be met due to large row sizes, the server will throw a + * `Status.RESOURCE_EXHAUSTED` exception + */ + public int maxMessageSize() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + /** + * If true, the server will wrap columns with a list. This is useful for clients that do not support modified batches + * with columns of differing lengths. + */ + public boolean columnsAsList() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded + * list / array to the first n elements, where n is the specified value. If the column value has length less than + * zero, the server will send the last n elements of the list / array. If the column value has length greater than + * the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + */ + public int previewListLengthLimit() { int o = __offset(16); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createBarrageSubscriptionOptions(FlatBufferBuilder builder, + boolean useDeephavenNulls, + int minUpdateIntervalMs, + int batchSize, + int maxMessageSize, + boolean columnsAsList, + int previewListLengthLimit) { + builder.startTable(7); + BarrageSubscriptionOptions.addPreviewListLengthLimit(builder, previewListLengthLimit); + BarrageSubscriptionOptions.addMaxMessageSize(builder, maxMessageSize); + BarrageSubscriptionOptions.addBatchSize(builder, batchSize); + BarrageSubscriptionOptions.addMinUpdateIntervalMs(builder, minUpdateIntervalMs); + BarrageSubscriptionOptions.addColumnsAsList(builder, columnsAsList); + BarrageSubscriptionOptions.addUseDeephavenNulls(builder, useDeephavenNulls); + return BarrageSubscriptionOptions.endBarrageSubscriptionOptions(builder); + } + + public static void startBarrageSubscriptionOptions(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addUseDeephavenNulls(FlatBufferBuilder builder, boolean useDeephavenNulls) { builder.addBoolean(1, useDeephavenNulls, false); } + public static void addMinUpdateIntervalMs(FlatBufferBuilder builder, int minUpdateIntervalMs) { builder.addInt(2, minUpdateIntervalMs, 0); } + public static void addBatchSize(FlatBufferBuilder builder, int batchSize) { builder.addInt(3, batchSize, 0); } + public static void addMaxMessageSize(FlatBufferBuilder builder, int maxMessageSize) { builder.addInt(4, maxMessageSize, 0); } + public static void addColumnsAsList(FlatBufferBuilder builder, boolean columnsAsList) { builder.addBoolean(5, columnsAsList, false); } + public static void addPreviewListLengthLimit(FlatBufferBuilder builder, int previewListLengthLimit) { builder.addInt(6, previewListLengthLimit, 0); } + public static int endBarrageSubscriptionOptions(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageSubscriptionOptions get(int j) { return get(new BarrageSubscriptionOptions(), j); } + public BarrageSubscriptionOptions get(BarrageSubscriptionOptions obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java new file mode 100644 index 0000000..d339606 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java @@ -0,0 +1,143 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * Describes the subscription the client would like to acquire. + */ +@SuppressWarnings("unused") +public final class BarrageSubscriptionRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageSubscriptionRequest getRootAsBarrageSubscriptionRequest(ByteBuffer _bb) { return getRootAsBarrageSubscriptionRequest(_bb, new BarrageSubscriptionRequest()); } + public static BarrageSubscriptionRequest getRootAsBarrageSubscriptionRequest(ByteBuffer _bb, BarrageSubscriptionRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageSubscriptionRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Ticket for the source data set. + */ + public byte ticket(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int ticketLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector ticketVector() { return ticketVector(new ByteVector()); } + public ByteVector ticketVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer ticketAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer ticketInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * The bitset of columns to subscribe. If not provided then all columns are subscribed. + */ + public byte columns(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int columnsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteVector columnsVector() { return columnsVector(new ByteVector()); } + public ByteVector columnsVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer columnsAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer columnsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * This is an encoded and compressed RowSet in position-space to subscribe to. If not provided then the entire + * table is requested. + */ + public byte viewport(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int viewportLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteVector viewportVector() { return viewportVector(new ByteVector()); } + public ByteVector viewportVector(ByteVector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer viewportAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer viewportInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + /** + * Options to configure your subscription. + */ + public io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions subscriptionOptions() { return subscriptionOptions(new io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions()); } + public io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions subscriptionOptions(io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * When this is set the viewport RowSet will be inverted against the length of the table. That is to say + * every position value is converted from `i` to `n - i - 1` if the table has `n` rows. + */ + public boolean reverseViewport() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * If this is set, the server will parrot this subscription token in the response. This token can be used to identify + * which subscription the server is now respecting. + */ + public byte subscriptionToken(int j) { int o = __offset(14); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int subscriptionTokenLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public ByteVector subscriptionTokenVector() { return subscriptionTokenVector(new ByteVector()); } + public ByteVector subscriptionTokenVector(ByteVector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer subscriptionTokenAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } + public ByteBuffer subscriptionTokenInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } + + public static int createBarrageSubscriptionRequest(FlatBufferBuilder builder, + int ticketOffset, + int columnsOffset, + int viewportOffset, + int subscriptionOptionsOffset, + boolean reverseViewport, + int subscriptionTokenOffset) { + builder.startTable(6); + BarrageSubscriptionRequest.addSubscriptionToken(builder, subscriptionTokenOffset); + BarrageSubscriptionRequest.addSubscriptionOptions(builder, subscriptionOptionsOffset); + BarrageSubscriptionRequest.addViewport(builder, viewportOffset); + BarrageSubscriptionRequest.addColumns(builder, columnsOffset); + BarrageSubscriptionRequest.addTicket(builder, ticketOffset); + BarrageSubscriptionRequest.addReverseViewport(builder, reverseViewport); + return BarrageSubscriptionRequest.endBarrageSubscriptionRequest(builder); + } + + public static void startBarrageSubscriptionRequest(FlatBufferBuilder builder) { builder.startTable(6); } + public static void addTicket(FlatBufferBuilder builder, int ticketOffset) { builder.addOffset(0, ticketOffset, 0); } + public static int createTicketVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createTicketVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startTicketVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addColumns(FlatBufferBuilder builder, int columnsOffset) { builder.addOffset(1, columnsOffset, 0); } + public static int createColumnsVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createColumnsVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startColumnsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addViewport(FlatBufferBuilder builder, int viewportOffset) { builder.addOffset(2, viewportOffset, 0); } + public static int createViewportVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createViewportVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startViewportVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addSubscriptionOptions(FlatBufferBuilder builder, int subscriptionOptionsOffset) { builder.addOffset(3, subscriptionOptionsOffset, 0); } + public static void addReverseViewport(FlatBufferBuilder builder, boolean reverseViewport) { builder.addBoolean(4, reverseViewport, false); } + public static void addSubscriptionToken(FlatBufferBuilder builder, int subscriptionTokenOffset) { builder.addOffset(5, subscriptionTokenOffset, 0); } + public static int createSubscriptionTokenVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createSubscriptionTokenVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startSubscriptionTokenVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBarrageSubscriptionRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageSubscriptionRequest get(int j) { return get(new BarrageSubscriptionRequest(), j); } + public BarrageSubscriptionRequest get(BarrageSubscriptionRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java new file mode 100644 index 0000000..2f03494 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java @@ -0,0 +1,200 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** + * A data header describing the shared memory layout of a "record" or "row" + * batch for a ticking barrage table. + */ +@SuppressWarnings("unused") +public final class BarrageUpdateMetadata extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); } + public static BarrageUpdateMetadata getRootAsBarrageUpdateMetadata(ByteBuffer _bb) { return getRootAsBarrageUpdateMetadata(_bb, new BarrageUpdateMetadata()); } + public static BarrageUpdateMetadata getRootAsBarrageUpdateMetadata(ByteBuffer _bb, BarrageUpdateMetadata obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BarrageUpdateMetadata __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * This batch is generated from an upstream table that ticks independently of the stream. If + * multiple events are coalesced into one update, the server may communicate that here for + * informational purposes. + */ + public long firstSeq() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long lastSeq() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + /** + * Indicates if this message was sent due to upstream ticks or due to a subscription change. + */ + public boolean isSnapshot() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * If this is a snapshot and the subscription is a viewport, then the effectively subscribed viewport + * will be included in the payload. It is an encoded and compressed RowSet. + */ + public byte effectiveViewport(int j) { int o = __offset(10); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int effectiveViewportLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public ByteVector effectiveViewportVector() { return effectiveViewportVector(new ByteVector()); } + public ByteVector effectiveViewportVector(ByteVector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer effectiveViewportAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } + public ByteBuffer effectiveViewportInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } + /** + * When this is set the viewport RowSet will be inverted against the length of the table. That is to say + * every position value is converted from `i` to `n - i - 1` if the table has `n` rows. + */ + public boolean effectiveReverseViewport() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * If this is a snapshot, then the effectively subscribed column set will be included in the payload. + */ + public byte effectiveColumnSet(int j) { int o = __offset(14); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int effectiveColumnSetLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public ByteVector effectiveColumnSetVector() { return effectiveColumnSetVector(new ByteVector()); } + public ByteVector effectiveColumnSetVector(ByteVector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer effectiveColumnSetAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } + public ByteBuffer effectiveColumnSetInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } + /** + * This is an encoded and compressed RowSet that was added in this update. + */ + public byte addedRows(int j) { int o = __offset(16); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int addedRowsLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; } + public ByteVector addedRowsVector() { return addedRowsVector(new ByteVector()); } + public ByteVector addedRowsVector(ByteVector obj) { int o = __offset(16); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer addedRowsAsByteBuffer() { return __vector_as_bytebuffer(16, 1); } + public ByteBuffer addedRowsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 16, 1); } + /** + * This is an encoded and compressed RowSet that was removed in this update. + */ + public byte removedRows(int j) { int o = __offset(18); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int removedRowsLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } + public ByteVector removedRowsVector() { return removedRowsVector(new ByteVector()); } + public ByteVector removedRowsVector(ByteVector obj) { int o = __offset(18); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer removedRowsAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } + public ByteBuffer removedRowsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } + /** + * This is an encoded and compressed RowSetShiftData describing how the keyspace of unmodified rows changed. + */ + public byte shiftData(int j) { int o = __offset(20); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int shiftDataLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } + public ByteVector shiftDataVector() { return shiftDataVector(new ByteVector()); } + public ByteVector shiftDataVector(ByteVector obj) { int o = __offset(20); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer shiftDataAsByteBuffer() { return __vector_as_bytebuffer(20, 1); } + public ByteBuffer shiftDataInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 1); } + /** + * This is an encoded and compressed RowSet that was included with this update. + * (the server may include rows not in addedRows if this is a viewport subscription to refresh + * unmodified rows that were scoped into view) + */ + public byte addedRowsIncluded(int j) { int o = __offset(22); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int addedRowsIncludedLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } + public ByteVector addedRowsIncludedVector() { return addedRowsIncludedVector(new ByteVector()); } + public ByteVector addedRowsIncludedVector(ByteVector obj) { int o = __offset(22); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer addedRowsIncludedAsByteBuffer() { return __vector_as_bytebuffer(22, 1); } + public ByteBuffer addedRowsIncludedInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 22, 1); } + /** + * The list of modified column data are in the same order as the field nodes on the schema. + */ + public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata modColumnNodes(int j) { return modColumnNodes(new io.deephaven.barrage.flatbuf.BarrageModColumnMetadata(), j); } + public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata modColumnNodes(io.deephaven.barrage.flatbuf.BarrageModColumnMetadata obj, int j) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int modColumnNodesLength() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; } + public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector modColumnNodesVector() { return modColumnNodesVector(new io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector()); } + public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector modColumnNodesVector(io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector obj) { int o = __offset(24); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createBarrageUpdateMetadata(FlatBufferBuilder builder, + long firstSeq, + long lastSeq, + boolean isSnapshot, + int effectiveViewportOffset, + boolean effectiveReverseViewport, + int effectiveColumnSetOffset, + int addedRowsOffset, + int removedRowsOffset, + int shiftDataOffset, + int addedRowsIncludedOffset, + int modColumnNodesOffset) { + builder.startTable(11); + BarrageUpdateMetadata.addLastSeq(builder, lastSeq); + BarrageUpdateMetadata.addFirstSeq(builder, firstSeq); + BarrageUpdateMetadata.addModColumnNodes(builder, modColumnNodesOffset); + BarrageUpdateMetadata.addAddedRowsIncluded(builder, addedRowsIncludedOffset); + BarrageUpdateMetadata.addShiftData(builder, shiftDataOffset); + BarrageUpdateMetadata.addRemovedRows(builder, removedRowsOffset); + BarrageUpdateMetadata.addAddedRows(builder, addedRowsOffset); + BarrageUpdateMetadata.addEffectiveColumnSet(builder, effectiveColumnSetOffset); + BarrageUpdateMetadata.addEffectiveViewport(builder, effectiveViewportOffset); + BarrageUpdateMetadata.addEffectiveReverseViewport(builder, effectiveReverseViewport); + BarrageUpdateMetadata.addIsSnapshot(builder, isSnapshot); + return BarrageUpdateMetadata.endBarrageUpdateMetadata(builder); + } + + public static void startBarrageUpdateMetadata(FlatBufferBuilder builder) { builder.startTable(11); } + public static void addFirstSeq(FlatBufferBuilder builder, long firstSeq) { builder.addLong(0, firstSeq, 0L); } + public static void addLastSeq(FlatBufferBuilder builder, long lastSeq) { builder.addLong(1, lastSeq, 0L); } + public static void addIsSnapshot(FlatBufferBuilder builder, boolean isSnapshot) { builder.addBoolean(2, isSnapshot, false); } + public static void addEffectiveViewport(FlatBufferBuilder builder, int effectiveViewportOffset) { builder.addOffset(3, effectiveViewportOffset, 0); } + public static int createEffectiveViewportVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createEffectiveViewportVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startEffectiveViewportVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addEffectiveReverseViewport(FlatBufferBuilder builder, boolean effectiveReverseViewport) { builder.addBoolean(4, effectiveReverseViewport, false); } + public static void addEffectiveColumnSet(FlatBufferBuilder builder, int effectiveColumnSetOffset) { builder.addOffset(5, effectiveColumnSetOffset, 0); } + public static int createEffectiveColumnSetVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createEffectiveColumnSetVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startEffectiveColumnSetVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addAddedRows(FlatBufferBuilder builder, int addedRowsOffset) { builder.addOffset(6, addedRowsOffset, 0); } + public static int createAddedRowsVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createAddedRowsVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startAddedRowsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addRemovedRows(FlatBufferBuilder builder, int removedRowsOffset) { builder.addOffset(7, removedRowsOffset, 0); } + public static int createRemovedRowsVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createRemovedRowsVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startRemovedRowsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addShiftData(FlatBufferBuilder builder, int shiftDataOffset) { builder.addOffset(8, shiftDataOffset, 0); } + public static int createShiftDataVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createShiftDataVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startShiftDataVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addAddedRowsIncluded(FlatBufferBuilder builder, int addedRowsIncludedOffset) { builder.addOffset(9, addedRowsIncludedOffset, 0); } + public static int createAddedRowsIncludedVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createAddedRowsIncludedVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startAddedRowsIncludedVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addModColumnNodes(FlatBufferBuilder builder, int modColumnNodesOffset) { builder.addOffset(10, modColumnNodesOffset, 0); } + public static int createModColumnNodesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startModColumnNodesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endBarrageUpdateMetadata(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BarrageUpdateMetadata get(int j) { return get(new BarrageUpdateMetadata(), j); } + public BarrageUpdateMetadata get(BarrageUpdateMetadata obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } +} + diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java new file mode 100644 index 0000000..101ac51 --- /dev/null +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java @@ -0,0 +1,33 @@ +// Copyright 2020 Deephaven Data Labs +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// automatically generated by the FlatBuffers compiler, do not modify + +package io.deephaven.barrage.flatbuf; + +/** + * There will always be types that cannot be easily supported over IPC. While column conversion mode is no longer + * supported, users can more explicitly configure the encoding/decoding behavior of the server. + */ +@SuppressWarnings("unused") +public final class ColumnConversionMode { + private ColumnConversionMode() { } + public static final byte Stringify = 1; + public static final byte JavaSerialization = 2; + public static final byte ThrowError = 3; + + public static final String[] names = { "Stringify", "JavaSerialization", "ThrowError", }; + + public static String name(int e) { return names[e - Stringify]; } +} + diff --git a/java/pom.xml b/java/pom.xml index 5896abc..457539b 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -35,7 +35,6 @@ ${project.basedir}/target/generated-sources 24.3.25 - 1.12.0 18.0.0 2 9+181-r4173-1 From 4b99a4e433a1483a908e878fddc8b32515b56c72 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 4 Nov 2024 17:22:49 -0700 Subject: [PATCH 03/11] Fixup Build --- java/pom.xml | 67 ++++++++++++++-------------------------------------- 1 file changed, 18 insertions(+), 49 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index 457539b..6902d9d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -170,28 +170,12 @@ 1.8 1.8 2048m - false true
maven-enforcer-plugin - - validate_java_and_maven_version - verify - - enforce - - false - - - - [3.3.0,4) - - - - avoid_bad_dependencies verify @@ -217,7 +201,7 @@ pl.project13.maven git-commit-id-plugin - 2.2.2 + 4.9.10 for-jars @@ -342,7 +326,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.13.0 @@ -359,7 +343,7 @@ maven-surefire-plugin - 3.0.0-M7 + 3.5.2 true true @@ -494,7 +478,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.0-M1 + 3.11.1 @@ -532,15 +516,15 @@ - error-prone + error-prone - !m2e.version + !m2e.version @@ -551,13 +535,23 @@ -XDcompilePolicy=simple - -Xplugin:ErrorProne + -Xplugin:ErrorProne -XepExcludedPaths:.*/(target/generated-source|format/src/main/java/org/apache/arrow/flatbuf)/.* + -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED com.google.errorprone error_prone_core - 2.4.0 + 2.31.0 @@ -566,31 +560,6 @@ - - error-prone-jdk8 - - - 1.8 - - !m2e.version - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - true - - -J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${errorprone.javac.version}/javac-${errorprone.javac.version}.jar - - - - - - - From 4b92d597c54d558022cb7b530d4220dd4273b5d8 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 4 Nov 2024 17:34:05 -0700 Subject: [PATCH 04/11] Fixup mvn install --- java/barrage-core/pom.xml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/java/barrage-core/pom.xml b/java/barrage-core/pom.xml index e85634d..821f6d9 100644 --- a/java/barrage-core/pom.xml +++ b/java/barrage-core/pom.xml @@ -31,6 +31,7 @@ 1.65.0 3.25.4 + 33.3.1-jre 1 @@ -45,6 +46,10 @@ grpc-protobuf ${dep.grpc.version} + + com.google.guava + guava + io.grpc grpc-stub @@ -72,6 +77,17 @@ test + + + + com.google.guava + guava-bom + ${dep.guava-bom.version} + pom + import + + + @@ -184,8 +200,8 @@ - io.grpc:grpc-core:jar:1.30.2 - io.grpc:grpc-context:jar:1.30.2 + io.grpc:grpc-core:jar:${dep.grpc.version} + io.grpc:grpc-context:jar:${dep.grpc.version} From 3b25f2f427b7c1a4d771d3f6f76978d400e548bd Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Mon, 4 Nov 2024 17:42:18 -0700 Subject: [PATCH 05/11] Update java version --- .github/workflows/package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index f3cd2af..0ebc7ea 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -19,7 +19,7 @@ jobs: - name: Setup JDK uses: actions/setup-java@v1 with: - java-version: '8.0.282' + java-version: '17.0.11' - name: Package with Maven - run: mvn --file java/pom.xml --batch-mode package \ No newline at end of file + run: mvn --file java/pom.xml --batch-mode package From b3490d71dabfdd9a9c81da68ea53cd1e29f98a63 Mon Sep 17 00:00:00 2001 From: Nate Bauernfeind Date: Mon, 4 Nov 2024 19:52:36 -0700 Subject: [PATCH 06/11] Update java/format/README.md Co-authored-by: Colin Alworth --- java/format/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/format/README.md b/java/format/README.md index c4aadb4..5c5535b 100644 --- a/java/format/README.md +++ b/java/format/README.md @@ -6,7 +6,7 @@ $ flatc --version flatc version 24.3.25 $ grep "dep.fbs.version" java/pom.xml - 1.12.0 + 24.3.25 ``` 2. Generate the flatbuffer java files by performing the following: From dc8195b222ecb32a6df4b127ef8452d9125363ba Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 6 Nov 2024 17:43:28 -0600 Subject: [PATCH 07/11] Proposed changes to the update (#42) --- java/barrage-core/pom.xml | 142 ++----------- java/format/README.md | 7 +- java/format/pom.xml | 25 ++- .../barrage/flatbuf/BarrageMessageType.java | 30 +-- .../flatbuf/BarrageMessageWrapper.java | 30 +-- .../flatbuf/BarrageModColumnMetadata.java | 30 +-- .../flatbuf/BarragePublicationOptions.java | 30 +-- .../flatbuf/BarragePublicationRequest.java | 30 +-- .../flatbuf/BarrageSnapshotOptions.java | 30 +-- .../flatbuf/BarrageSnapshotRequest.java | 30 +-- .../flatbuf/BarrageSubscriptionOptions.java | 30 +-- .../flatbuf/BarrageSubscriptionRequest.java | 30 +-- .../flatbuf/BarrageUpdateMetadata.java | 30 +-- .../barrage/flatbuf/ColumnConversionMode.java | 30 +-- java/pom.xml | 199 +----------------- 15 files changed, 214 insertions(+), 489 deletions(-) diff --git a/java/barrage-core/pom.xml b/java/barrage-core/pom.xml index 821f6d9..aff1be4 100644 --- a/java/barrage-core/pom.xml +++ b/java/barrage-core/pom.xml @@ -26,21 +26,15 @@ barrage-core Deephaven Barrage Core An RPC mechanism for transferring ticking Arrow data. - jar 1.65.0 3.25.4 - 33.3.1-jre - 1 + 33.3.1-jre + ${project.build.directory}/generated-sources/protobuf - - io.grpc - grpc-core - ${dep.grpc.version} - io.grpc grpc-protobuf @@ -49,6 +43,7 @@ com.google.guava guava + ${dep.guava.version} io.grpc @@ -66,28 +61,10 @@ ${dep.grpc.version} - org.apache.arrow - flight-core - - - - com.google.api.grpc - proto-google-common-protos - 1.12.0 - test + org.apache.arrow + flight-core - - - - com.google.guava - guava-bom - ${dep.guava-bom.version} - pom - import - - - @@ -97,69 +74,6 @@ - - org.apache.maven.plugins - maven-shade-plugin - 3.4.0 - - - shade-main - package - - shade - - - true - shaded - - - io.grpc:* - com.google.protobuf:* - - - - - com.google.protobuf - io.deephaven.barrage.com.google.protobuf - - - - - - - - - shade-ext - package - - shade - - - true - shaded-ext - - - io.grpc:* - com.google.protobuf:* - - - - - com.google.protobuf - io.deephaven.barrage.com.google.protobuf - - - com.google.common - io.deephaven.barrage.com.google.common - - - - - - - - - org.xolstice.maven.plugins protobuf-maven-plugin @@ -175,7 +89,7 @@ src ${basedir}/../../format/ - ${project.build.directory}/generated-sources/protobuf + ${protoOutDir} **/BrowserFlight.proto @@ -188,22 +102,24 @@ + - org.apache.maven.plugins - maven-dependency-plugin + com.mycila + license-maven-plugin + 4.6 + +
${basedir}/../../header
+ + **/*.java + + ${protoOutDir} +
- analyze - verify + process-sources - analyze-only + format - - - io.grpc:grpc-core:jar:${dep.grpc.version} - io.grpc:grpc-context:jar:${dep.grpc.version} - -
@@ -220,30 +136,12 @@ - ${project.build.directory}/generated-sources/protobuf + ${protoOutDir} - - maven-assembly-plugin - 3.4.2 - - - jar-with-dependencies - - - - - make-assembly - package - - single - - - - diff --git a/java/format/README.md b/java/format/README.md index 5c5535b..623b30d 100644 --- a/java/format/README.md +++ b/java/format/README.md @@ -17,11 +17,8 @@ cd $BARRAGE_HOME rm -rf java/format/src # regenerate from the .fbs files flatc --java -o java/format/src/main/java format/*.fbs -# prepend license header -find java/format/src -type f | while read file; do - (cat header | while read line; do echo "// $line"; done; cat $file) > $file.tmp - mv $file.tmp $file -done +# generate license headers +mvn compile ``` 3. Ensure any new files are added to the git repository: diff --git a/java/format/pom.xml b/java/format/pom.xml index 32df6e2..38f2e8a 100644 --- a/java/format/pom.xml +++ b/java/format/pom.xml @@ -24,7 +24,6 @@ barrage-format - jar Barrage Format Generated Java files from the IPC Flatbuffer definitions. @@ -35,4 +34,28 @@ + + + + + com.mycila + license-maven-plugin + 4.6 + +
${basedir}/../../header
+ + **/*.java + +
+ + + process-sources + + format + + + +
+
+
diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java index 110eb50..c6c88db 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; @SuppressWarnings("unused") diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java index 2f02323..b2240f8 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java index f28e028..3f73aed 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java index 92cc82f..b0d2269 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java index 3b4ccb2..41da1ef 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java index 7c6d598..b48ac4a 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java index 724aa80..e25624a 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java index 2454ba3..0015fc3 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java index d339606..9fc4030 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java index 2f03494..7c89082 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; import com.google.flatbuffers.BaseVector; diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java index 101ac51..f99eb96 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java @@ -1,18 +1,18 @@ -// Copyright 2020 Deephaven Data Labs -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// automatically generated by the FlatBuffers compiler, do not modify - +/* + * Copyright 2020 Deephaven Data Labs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.deephaven.barrage.flatbuf; /** diff --git a/java/pom.xml b/java/pom.xml index 6902d9d..71254d8 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -33,11 +33,11 @@ https://www.deephaven.io/ - ${project.basedir}/target/generated-sources + 8 + UTF-8 + UTF-8 24.3.25 18.0.0 - 2 - 9+181-r4173-1 @@ -64,7 +64,6 @@ - org.apache.rat @@ -144,35 +143,8 @@ - - - - test-jar - - - true - - - - - org.apache.maven.plugins - maven-resources-plugin - - UTF-8 - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - 2048m - true - - maven-enforcer-plugin @@ -327,38 +299,11 @@ org.apache.maven.plugins maven-compiler-plugin 3.13.0 - - - - org.immutables - value - 2.8.2 - - - maven-enforcer-plugin 3.1.0 - - maven-surefire-plugin - 3.5.2 - - true - true - ${forkCount} - true - - ${project.build.directory} - true - UTC - - - -Darrow.vector.max_allocation_bytes=1048576 - - org.apache.maven.plugins maven-release-plugin @@ -370,74 +315,6 @@ -Papache-release ${arguments} - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.6,) - - run - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - [1.2,) - - enforce - - - - - - - - - org.apache.maven.plugins - - maven-remote-resources-plugin - - [1.1,) - - process - - - - - - - - - org.apache.rat - apache-rat-plugin - [0.10,) - - check - - - - - - - - - - @@ -460,19 +337,9 @@ - - com.google.api.grpc - proto-google-common-protos - 2.9.6 - test - - - - - @@ -502,64 +369,4 @@ format barrage-core - - - - java-8 - - [1.8,) - - - none - -Xdoclint:none - - - - - - error-prone - - - !m2e.version - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - -XDcompilePolicy=simple - -Xplugin:ErrorProne -XepExcludedPaths:.*/(target/generated-source|format/src/main/java/org/apache/arrow/flatbuf)/.* - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED - -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED - - - - com.google.errorprone - error_prone_core - 2.31.0 - - - - - - - - - - From 2f884a569b01b1d2614df7c0755b0500ac0341f2 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Wed, 6 Nov 2024 16:45:09 -0700 Subject: [PATCH 08/11] Make header a year range --- header | 2 +- .../java/io/deephaven/barrage/flatbuf/BarrageMessageType.java | 2 +- .../io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java | 2 +- .../io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java | 2 +- .../io/deephaven/barrage/flatbuf/BarragePublicationOptions.java | 2 +- .../io/deephaven/barrage/flatbuf/BarragePublicationRequest.java | 2 +- .../io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java | 2 +- .../io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java | 2 +- .../deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java | 2 +- .../deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java | 2 +- .../io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java | 2 +- .../java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/header b/header index a21f424..c631882 100644 --- a/header +++ b/header @@ -1,4 +1,4 @@ -Copyright 2020 Deephaven Data Labs +Copyright 2020-2024 Deephaven Data Labs Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java index c6c88db..3f3756a 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageType.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java index b2240f8..779cea9 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageMessageWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java index 3f73aed..a6c5657 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageModColumnMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java index b0d2269..a9a0209 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java index 41da1ef..e2d8e28 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarragePublicationRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java index b48ac4a..604cf29 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java index e25624a..f914aee 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSnapshotRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java index 0015fc3..ed762ae 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java index 9fc4030..4f35771 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageSubscriptionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java index 7c89082..07bd0c1 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/BarrageUpdateMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java index f99eb96..4fad54b 100644 --- a/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java +++ b/java/format/src/main/java/io/deephaven/barrage/flatbuf/ColumnConversionMode.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 Deephaven Data Labs + * Copyright 2020-2024 Deephaven Data Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From e7a79c4178736b9eab5a5c09135f9e05c80c4128 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Fri, 8 Nov 2024 17:15:32 -0700 Subject: [PATCH 09/11] Ryan's feedback from dh-core text --- format/Barrage.fbs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/format/Barrage.fbs b/format/Barrage.fbs index a587791..e3303c8 100644 --- a/format/Barrage.fbs +++ b/format/Barrage.fbs @@ -78,10 +78,13 @@ table BarrageSubscriptionOptions { /// with columns of differing lengths. columns_as_list: bool; - /// If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded - /// list / array to the first n elements, where n is the specified value. If the column value has length less than - /// zero, the server will send the last n elements of the list / array. If the column value has length greater than - /// the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + /// The maximum length of any list / array to encode. + /// - If zero, list lengths will not be limited. + /// - If non-zero, the server will limit the length of any encoded list / array to the absolute value of the returned length. + /// - If less than zero, the server will encode elements from the end of the list / array, rather than from the beginning. + /// + /// Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than + /// the maximum number you wish to display. preview_list_length_limit: int = 0; } @@ -127,10 +130,13 @@ table BarrageSnapshotOptions { /// `Status.RESOURCE_EXHAUSTED` exception max_message_size: int; - /// If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded - /// list / array to the first n elements, where n is the specified value. If the column value has length less than - /// zero, the server will send the last n elements of the list / array. If the column value has length greater than - /// the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation. + /// The maximum length of any list / array to encode. + /// - If zero, list lengths will not be limited. + /// - If non-zero, the server will limit the length of any encoded list / array to the absolute value of the returned length. + /// - If less than zero, the server will encode elements from the end of the list / array, rather than from the beginning. + /// + /// Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than + /// the maximum number you wish to display. preview_list_length_limit: int = 0; } From 0ccdb38902ba7c55196299d10e00c6748ac885f0 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Fri, 8 Nov 2024 17:18:21 -0700 Subject: [PATCH 10/11] Setup npm for 0.7.0 release --- javascript/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/package-lock.json b/javascript/package-lock.json index 0e108cc..e3e7fb2 100644 --- a/javascript/package-lock.json +++ b/javascript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@deephaven/barrage", - "version": "0.6.1-snapshot.0", + "version": "0.7.0-snapshot.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@deephaven/barrage", - "version": "0.6.1-snapshot.0", + "version": "0.7.0-snapshot.0", "license": "Apache-2.0", "dependencies": { "flatbuffers": "^1.12.0" From bc36b11bcb3629709ad5d17763218b790af0c2af Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Sat, 9 Nov 2024 11:25:31 -0700 Subject: [PATCH 11/11] Colin's feedback --- format/Barrage.fbs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/format/Barrage.fbs b/format/Barrage.fbs index e3303c8..baea57e 100644 --- a/format/Barrage.fbs +++ b/format/Barrage.fbs @@ -20,6 +20,9 @@ enum BarrageMessageType : byte { None = 0, /// enum values 1 - 3 are reserved for future use + UNUSED_1 = 1, + UNUSED_2 = 2, + UNUSED_3 = 3, /// for subscription parsing/management (aka DoPut, DoExchange) BarrageSerializationOptions = 4, @@ -85,7 +88,7 @@ table BarrageSubscriptionOptions { /// /// Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than /// the maximum number you wish to display. - preview_list_length_limit: int = 0; + preview_list_length_limit: long = 0; } /// Describes the subscription the client would like to acquire. @@ -137,7 +140,7 @@ table BarrageSnapshotOptions { /// /// Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than /// the maximum number you wish to display. - preview_list_length_limit: int = 0; + preview_list_length_limit: long = 0; } /// Describes the snapshot the client would like to acquire.