[ 
https://issues.apache.org/jira/browse/BEAM-7913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901431#comment-16901431
 ] 

Sam Whittle commented on BEAM-7913:
-----------------------------------

Current way to drain from a DataflowPipelineJob and DataflowPipelineOptions:
          
DataflowPipelineJob job = (DataflowPipelineJob)p.run();
...
DataflowPipelineOptions options = ...;
DataflowClient client = DataflowClient.create(options);
Job content = new Job();
content.setProjectId(job.getProjectId());
content.setId(job.getJobId());
content.setRequestedState("JOB_STATE_DRAINING");
client.updateJob(job.getJobId(), content);


> Add drain() to DataflowPipelineJob
> ----------------------------------
>
>                 Key: BEAM-7913
>                 URL: https://issues.apache.org/jira/browse/BEAM-7913
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-dataflow
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: Minor
>
> Dataflow supports draining jobs but there is no easy programatic way to do it.
> I propose adding a drain() method to DataflowPipelineJob similar to the 
> existing cancel() method (inherited from PipelineResult).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to