You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "m-trieu (via GitHub)" <gi...@apache.org> on 2023/08/22 23:37:17 UTC

[GitHub] [beam] m-trieu commented on a diff in pull request #28016: remove sync stub list from GrpcWindmillServer

m-trieu commented on code in PR #28016:
URL: https://github.com/apache/beam/pull/28016#discussion_r1302299309


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/grpcclient/GrpcWindmillServer.java:
##########
@@ -360,69 +343,34 @@ private <ResponseT> ResponseT callWithBackoff(Supplier<ResponseT> function) {
 
   @Override
   public GetWorkResponse getWork(GetWorkRequest request) {
-    if (syncApplianceStub == null) {
-      return callWithBackoff(
-          () ->
-              syncStub()
-                  .withDeadlineAfter(unaryDeadlineSeconds, TimeUnit.SECONDS)
-                  .getWork(
-                      request
-                          .toBuilder()
-                          .setJobId(options.getJobId())
-                          .setProjectId(options.getProject())
-                          .setWorkerId(options.getWorkerId())
-                          .build()));
-    } else {
-      return callWithBackoff(
-          () ->
-              syncApplianceStub
-                  .withDeadlineAfter(unaryDeadlineSeconds, TimeUnit.SECONDS)
-                  .getWork(request));
+    if (syncApplianceStub != null) {
+      return callWithBackoff(() -> syncApplianceStub.getWork(request));
     }
+
+    throw new RpcException(
+        new UnsupportedOperationException(
+            "Unary GetWork calls are not supported with Windmill service."));

Review Comment:
   done.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org