[
https://issues.apache.org/jira/browse/BEAM-5262?focusedWorklogId=142943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-142943
]
ASF GitHub Bot logged work on BEAM-5262:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Sep/18 02:19
Start Date: 11/Sep/18 02:19
Worklog Time Spent: 10m
Work Description: angoenka commented on a change in pull request #6301:
[BEAM-5262] Add Reference runner support for add state stream
URL: https://github.com/apache/beam/pull/6301#discussion_r216528105
##########
File path:
runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/job/ReferenceRunnerJobService.java
##########
@@ -201,6 +204,36 @@ public void getState(
responseObserver.onCompleted();
}
+ @Override
+ public void getStateStream(
+ GetJobStateRequest request, StreamObserver<GetJobStateResponse>
responseObserver) {
+ LOG.trace("{} {}", GetJobStateRequest.class.getSimpleName(), request);
+ String invocationId = request.getJobId();
+ try {
+ Thread.sleep(WAIT_MS);
+ Enum state = jobStates.getOrDefault(request.getJobId(),
Enum.UNRECOGNIZED);
+
responseObserver.onNext(GetJobStateResponse.newBuilder().setState(state).build());
+ while (Enum.RUNNING.equals(state)) {
+ Thread.sleep(WAIT_MS);
+ state = jobStates.getOrDefault(request.getJobId(), Enum.UNRECOGNIZED);
+ }
+
responseObserver.onNext(GetJobStateResponse.newBuilder().setState(state).build());
Review comment:
The idea here is that if the pipeline is not running then we simply publish
the state in L220 and if it is running then we would have published the state
in L215 and we will not republish till the state changes to something other
than running.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 142943)
Time Spent: 50m (was: 40m)
> JobState support for Reference Runner
> -------------------------------------
>
> Key: BEAM-5262
> URL: https://issues.apache.org/jira/browse/BEAM-5262
> Project: Beam
> Issue Type: Bug
> Components: runner-direct
> Reporter: Ankur Goenka
> Assignee: Ankur Goenka
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Reference runner does not support getStateStream which is needed by portable
> SDK
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)