Search in sources :

Example 1 with CommitWorkResponse

use of org.apache.beam.runners.dataflow.worker.windmill.Windmill.CommitWorkResponse in project beam by apache.

the class FakeWindmillServer method commitWork.

@Override
public CommitWorkResponse commitWork(Windmill.CommitWorkRequest request) {
    LOG.debug("commitWorkRequest: {}", request);
    validateCommitWorkRequest(request);
    for (ComputationCommitWorkRequest computationRequest : request.getRequestsList()) {
        for (WorkItemCommitRequest commit : computationRequest.getRequestsList()) {
            commitsReceived.put(commit.getWorkToken(), commit);
        }
    }
    CommitWorkResponse response = CommitWorkResponse.newBuilder().build();
    LOG.debug("commitWorkResponse: {}", response);
    return response;
}
Also used : WorkItemCommitRequest(org.apache.beam.runners.dataflow.worker.windmill.Windmill.WorkItemCommitRequest) CommitWorkResponse(org.apache.beam.runners.dataflow.worker.windmill.Windmill.CommitWorkResponse) ComputationCommitWorkRequest(org.apache.beam.runners.dataflow.worker.windmill.Windmill.ComputationCommitWorkRequest)

Aggregations

CommitWorkResponse (org.apache.beam.runners.dataflow.worker.windmill.Windmill.CommitWorkResponse)1 ComputationCommitWorkRequest (org.apache.beam.runners.dataflow.worker.windmill.Windmill.ComputationCommitWorkRequest)1 WorkItemCommitRequest (org.apache.beam.runners.dataflow.worker.windmill.Windmill.WorkItemCommitRequest)1