From 19f9c9ae819bdff1e52dbb1c0734a7493a10f887 Mon Sep 17 00:00:00 2001 From: stanbrub Date: Mon, 11 Sep 2023 21:12:44 -0600 Subject: [PATCH] Upgraded barrage java client --- pom.xml | 10 +++++----- .../benchmark/connect/BarrageConnector.java | 12 +++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 631ff9dc..b7f91b44 100644 --- a/pom.xml +++ b/pom.xml @@ -157,13 +157,13 @@ - + io.netty netty-all 4.1.79.Final - + io.grpc grpc-all @@ -173,7 +173,7 @@ com.google.protobuf protobuf-java - 3.21.9 + 3.21.7 io.confluent @@ -183,12 +183,12 @@ io.deephaven deephaven-java-client-barrage-dagger - 0.22.0 + 0.28.0 io.deephaven deephaven-log-to-slf4j - 0.22.0 + 0.28.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 39df0235..605f4b72 100644 --- a/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java +++ b/src/main/java/io/deephaven/benchmark/connect/BarrageConnector.java @@ -24,8 +24,10 @@ import io.deephaven.client.impl.TableHandle; import io.deephaven.client.impl.TableHandleManager; import io.deephaven.client.impl.script.Changes; +import io.deephaven.engine.context.ExecutionContext; 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; @@ -220,7 +222,15 @@ private BarrageSession getSession(ManagedChannel channel) { BarrageSessionFactory barrageSessionFactory = DaggerDeephavenBarrageRoot.create().factoryBuilder() .managedChannel(channel).scheduler(scheduler).allocator(bufferAllocator).build(); - return barrageSessionFactory.newBarrageSession(); + var barrageSession = barrageSessionFactory.newBarrageSession(); + getExecutionContext().open(); + return barrageSession; + } + + private ExecutionContext getExecutionContext() { + final var updateGraph = PeriodicUpdateGraph.newBuilder("DEFAULT").existingOrBuild(); + return ExecutionContext.newBuilder().markSystemic().emptyQueryScope().newQueryLibrary() + .setUpdateGraph(updateGraph).build(); } record Subscription(TableHandle handle, BarrageSubscription subscription) {