From 40083565d28416cd4d49ef986ba627f289b8cc6a Mon Sep 17 00:00:00 2001
From: Stan Brubaker <120737309+stanbrub@users.noreply.github.com>
Date: Thu, 19 Oct 2023 19:08:44 -0600
Subject: [PATCH] Upgrade barrage java client dependency to 0.29.0 (#195)
---
pom.xml | 24 +++++++++----------
.../benchmark/connect/BarrageConnector.java | 15 ++++++------
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/pom.xml b/pom.xml
index b7f91b44..11f20ced 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
org.codehaus.mojo
build-helper-maven-plugin
- 3.3.0
+ 3.4.0
add-test-source
@@ -27,7 +27,7 @@
maven-compiler-plugin
- 3.10.1
+ 3.11.0
17
@@ -36,7 +36,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.4.1
+ 3.5.1
package
@@ -81,7 +81,7 @@
com.diffplug.spotless
spotless-maven-plugin
- 2.33.0
+ 2.40.0
@@ -107,7 +107,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0
+ 3.1.2
/io/deephaven/benchmark/tests/**/*Test
@@ -124,7 +124,7 @@
org.apache.maven.plugins
maven-failsafe-plugin
- 3.0.0
+ 3.1.2
0
@@ -163,32 +163,32 @@
netty-all
4.1.79.Final
-
+
io.grpc
grpc-all
- 1.50.1
+ 1.50.0
com.google.protobuf
protobuf-java
- 3.21.7
+ 3.21.7
io.confluent
kafka-avro-serializer
- 7.3.1
+ 7.5.1
io.deephaven
deephaven-java-client-barrage-dagger
- 0.28.0
+ 0.29.0
io.deephaven
deephaven-log-to-slf4j
- 0.28.0
+ 0.29.0
org.junit.platform
diff --git a/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java b/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java
index 605f4b72..763c9727 100644
--- a/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java
+++ b/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java
@@ -28,7 +28,6 @@
import io.deephaven.engine.table.TableUpdate;
import io.deephaven.engine.table.impl.InstrumentedTableUpdateListener;
import io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph;
-import io.deephaven.extensions.barrage.BarrageSnapshotOptions;
import io.deephaven.extensions.barrage.BarrageSubscriptionOptions;
import io.deephaven.extensions.barrage.table.BarrageTable;
import io.deephaven.qst.TableCreationLogic;
@@ -53,7 +52,7 @@ public class BarrageConnector implements AutoCloseable {
final private ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(4);
final private BufferAllocator bufferAllocator = new RootAllocator();
final private Map subscriptions = new LinkedHashMap<>();
- final private Map snapshots = new LinkedHashMap<>();
+ final private Map snapshots = new LinkedHashMap<>();
final private Set variableNames = new HashSet<>();
final private AtomicBoolean isClosed = new AtomicBoolean(false);
private Changes changes = null;
@@ -114,14 +113,16 @@ public Future fetchSnapshotData(String table, Consumer tab
MetricsFuture future = new MetricsFuture(metrics);
snapshots.computeIfAbsent(table, s -> {
try {
- BarrageSnapshotOptions options = BarrageSnapshotOptions.builder().build();
+ BarrageSubscriptionOptions options = BarrageSubscriptionOptions.builder().build();
TableHandleManager snapshotManager = session.session().batch();
+
TableCreationLogic logic = findTable(table).ticket().ticketId().table().logic();
TableHandle handle = snapshotManager.executeLogic(logic);
- BarrageSnapshot snapshot = session.snapshot(handle, options);
- BarrageTable snapshotTable = snapshot.entireTable();
- tableHandler.accept(CachedResultTable.create(snapshotTable));
- return new Snapshot(handle, snapshot);
+ BarrageSubscription subscription = session.subscribe(handle, options);
+
+ BarrageTable snapTable = subscription.snapshotEntireTable();
+ tableHandler.accept(CachedResultTable.create(snapTable));
+ return new Subscription(handle, subscription);
} catch (Exception ex) {
throw new RuntimeException("Failed to fetch snapshot table data: " + table, ex);
} finally {