m-trieu commented on code in PR #31902:
URL: https://github.com/apache/beam/pull/31902#discussion_r1795801403
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/harness/FanOutStreamingEngineWorkerHarness.java:
##########
@@ -381,29 +380,20 @@ private ImmutableMap<String, Supplier<GetDataStream>>
createNewGlobalDataStreams
private Supplier<GetDataStream> existingOrNewGetDataStreamFor(
Entry<String, Endpoint> keyedEndpoint,
ImmutableMap<String, Supplier<GetDataStream>> currentGlobalDataStreams) {
- return Preconditions.checkNotNull(
+ return checkNotNull(
currentGlobalDataStreams.getOrDefault(
keyedEndpoint.getKey(),
() ->
streamFactory.createGetDataStream(
- newOrExistingStubFor(keyedEndpoint.getValue()), new
ThrottleTimer())));
- }
-
- private CloudWindmillServiceV1Alpha1Stub newOrExistingStubFor(Endpoint
endpoint) {
- return
Optional.ofNullable(connections.get().windmillConnections().get(endpoint))
- .map(WindmillConnection::stub)
- .orElseGet(() -> createWindmillStub(endpoint));
+ createWindmillStub(keyedEndpoint.getValue()), new
ThrottleTimer())));
}
- private WindmillStreamSender createAndStartWindmillStreamSenderFor(
- WindmillConnection connection) {
- // Initially create each stream with no budget. The budget will be
eventually assigned by the
- // GetWorkBudgetDistributor.
+ private WindmillStreamSender createAndStartWindmillStreamSender(Endpoint
connection) {
WindmillStreamSender windmillStreamSender =
Review Comment:
for fallback
if we don't pass in direct endpoint we will just fallback to dispatcher stub
at some point we were thinking about supporting dispatcher as a passthrough
proxy with the user worker telling it which backend to hit and this would also
allow that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]