Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public BeamFnStatusClient(
PipelineOptions options,
Cache<?, ?> cache) {
this.channel = channelFactory.apply(apiServiceDescriptor);
this.outboundObserver =
BeamFnWorkerStatusGrpc.newStub(channel).workerStatus(new InboundObserver());
this.processBundleCache = processBundleCache;
this.memoryMonitor = MemoryMonitor.fromOptions(options);
this.cache = cache;
Expand All @@ -76,6 +74,11 @@ public BeamFnStatusClient(
thread.setPriority(Thread.MIN_PRIORITY);
thread.setName("MemoryMonitor");
thread.start();

// Start the rpc after all the initialization is complete as the InboundObserver
// may be called any time after this.
this.outboundObserver =
BeamFnWorkerStatusGrpc.newStub(channel).workerStatus(new InboundObserver());
}

@Override
Expand Down
Loading