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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]