Skip to content

Commit

Permalink
Merge branch 'deephaven:main' into handle-per-operation-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub authored Dec 18, 2023
2 parents 3449ed8 + 5e438f9 commit 8ca9d4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,23 +179,23 @@
</extensions>
</build>
<dependencies>
<!-- Added because of conflict with 4.1.68 -->
<!-- Added because of conflicts -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.79.Final</version>
<version>4.1.96.Final</version>
</dependency>
<!-- Added because of conflict with 1.49.1 -->
<!-- Added because of conflicts -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
<version>1.50.0</version>
<version>1.58.0</version>
</dependency>
<!-- Added because of conflict with 3.17.3 -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.21.7</version>
<version>3.24.1</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
Expand All @@ -205,12 +205,12 @@
<dependency>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-java-client-barrage-dagger</artifactId>
<version>0.29.0</version>
<version>0.31.0</version>
</dependency>
<dependency>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-log-to-slf4j</artifactId>
<version>0.29.0</version>
<version>0.31.0</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
import io.deephaven.client.impl.TableHandleManager;
import io.deephaven.client.impl.script.Changes;
import io.deephaven.engine.context.ExecutionContext;
import io.deephaven.engine.table.Table;
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.BarrageSubscriptionOptions;
import io.deephaven.extensions.barrage.table.BarrageTable;
import io.deephaven.qst.TableCreationLogic;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
Expand Down Expand Up @@ -120,7 +120,7 @@ public Future<Metrics> fetchSnapshotData(String table, Consumer<ResultTable> tab
TableHandle handle = snapshotManager.executeLogic(logic);
BarrageSubscription subscription = session.subscribe(handle, options);

BarrageTable snapTable = subscription.snapshotEntireTable();
Table snapTable = subscription.snapshotEntireTable().get();
tableHandler.accept(CachedResultTable.create(snapTable));
return new Subscription(handle, subscription);
} catch (Exception ex) {
Expand Down Expand Up @@ -153,7 +153,7 @@ public Future<Metrics> fetchTickingData(String table, Function<ResultTable, Bool
TableHandle handle = subscriptionManager.executeLogic(logic);
BarrageSubscription subscription = session.subscribe(handle, options);

BarrageTable subscriptionTable = subscription.entireTable();
Table subscriptionTable = subscription.entireTable().get();
subscriptionTable.addUpdateListener(
new TableListener(table, subscriptionTable, tableHandler, future, metrics));
return new Subscription(handle, subscription);
Expand All @@ -175,7 +175,6 @@ public void close() {
isClosed.set(true);
subscriptions.values().forEach(s -> {
s.handle.close();
s.subscription.close();
});
subscriptions.clear();
variableNames.clear();
Expand Down Expand Up @@ -244,13 +243,13 @@ class TableListener extends InstrumentedTableUpdateListener {
static final long serialVersionUID = 2589173746389448005L;
final Function<ResultTable, Boolean> refreshHandler;
final String tableName;
final BarrageTable table;
final Table table;
final MetricsFuture future;
final Metrics metrics;
final AtomicLong ticks = new AtomicLong(0);
final long beginTime = System.currentTimeMillis();

public TableListener(String tableName, BarrageTable table, Function<ResultTable, Boolean> refreshHandler,
public TableListener(String tableName, Table table, Function<ResultTable, Boolean> refreshHandler,
MetricsFuture future, Metrics metrics) {
super("Table '" + tableName + "' Listener");
this.refreshHandler = refreshHandler;
Expand Down

0 comments on commit 8ca9d4c

Please sign in to comment.