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

Amit Sela commented on BEAM-849:
--------------------------------

Joining the discussion, I'd like to ask for some more clarifications on the 
different {{PipelineResult.State}}.

My biggest confusion is with {{waitUntilFinish(Duration)}} in streaming:
Is the runner expected to stop on timeout ? or simply return (making this 
effectively a blocking line) ?

If the runner is expected to stop, then {{null}} should not be an option 
anymore, right ? it's either {{STOP}} or {{CANCELLED}} - which is a also a 
question since streaming application are not supposed to "ever" be {{DONE}}, 
right ? or is {{DONE}} OK here since it was expected to run for a predetermined 
time period ? this one is confusing... 

If the runner should simply block and avoid stopping the application, then I 
don't think the spec is well defined:
{code}
 /**
   * Waits until the pipeline finishes and returns the final status.
   * It times out after the given duration.
   *
   * @param duration The time to wait for the pipeline to finish.
   *     Provide a value less than 1 ms for an infinite wait.
   *
   * @return The final state of the pipeline or null on timeout.
   * @throws UnsupportedOperationException if the runner does not support 
cancellation.
   */
  State waitUntilFinish(Duration duration);
{code}
Note: *Waits until the pipeline finishes...*

Thoughts ?

> Redesign PipelineResult API
> ---------------------------
>
>                 Key: BEAM-849
>                 URL: https://issues.apache.org/jira/browse/BEAM-849
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Pei He
>
> Current state: 
> Jira https://issues.apache.org/jira/browse/BEAM-443 addresses 
> waitUntilFinish() and cancel(). 
> However, there are additional work around PipelineResult: 
> need clearly defined contract and verification across all runners 
> need to revisit how to handle metrics/aggregators 
> need to be able to get logs



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to