[
https://issues.apache.org/jira/browse/TEZ-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14336016#comment-14336016
]
Siddharth Seth commented on TEZ-1967:
-------------------------------------
[~vasanthkumar] - minor fixes required in the latest revision.
{code}
if(timeout >= 0 && statusPollInterval > timeout) {
statusPollInterval = timeout;
}
{code}
In both DAGClientImpl and DAGImpl, statusPollInterval is an instance variable.
It's possible for this value to get set very low depending on when and how the
method is invoked - e.g. one invocation with a timeout of 10 followed by
another with a timeout of 200.
Once the value is set really low, it'll never go back to what it's configured
to.
Changing this to be a local variable within the method should fix it.
After this change, I think this is good to go. I'll create a follow up for some
of the enhancements mentioned above.
> Add a monitoring API on DAGClient which returns after a time interval or on
> DAG state change
> --------------------------------------------------------------------------------------------
>
> Key: TEZ-1967
> URL: https://issues.apache.org/jira/browse/TEZ-1967
> Project: Apache Tez
> Issue Type: Improvement
> Affects Versions: 0.7.0
> Reporter: Siddharth Seth
> Assignee: Vasanth kumar RJ
> Attachments: TEZ-1967-InitialReview.patch, TEZ-1967.1.patch,
> TEZ-1967.2.patch, TEZ-1967.3.patch, TEZ-1967.4.patch
>
>
> To monitor a running DAG, clients end up using DAGClient.getDAGSstatus in a
> loop with a poll interval.
> In the worst case, they find out about DAG completion, failure etc only after
> the poll interval.
> Instead, an API can be added which waits on the AM for a specified interval,
> but can return earlier if the DAG state changes.
> This will end up blocking RPC handlers - but that isn't a problem since we
> don't have many entities querying for DAG status.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)