[
https://issues.apache.org/jira/browse/YARN-6342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925913#comment-15925913
]
Varun Saxena edited comment on YARN-6342 at 3/15/17 11:10 AM:
--------------------------------------------------------------
bq. In stop: it calls shutdownNow which doens't wait for pending tasks, should
it use shutdown instead ?
The executor we use in TimelineV2ClientImpl is a single thread executor with
only one task i.e. the runnable created by createRunnable(). So there wont be
any pending tasks. And inside createRunnable()'s run method, in finally block,
we try to dispatch as many entities as we can in 2 seconds.
bq. If any exception happens when publish one entity
(publishWithoutBlockingOnQueue), the thread exists
This makes sense. I think we should catch the exception so that thread does not
exit.
was (Author: varun_saxena):
bq. In stop: it calls shutdownNow which doens't wait for pending tasks, should
it use shutdown instead ?
The executor we use in TimelineV2ClientImpl is a single thread executor with
only one task i.e. the runnable created by createRunnable(). So there wont be
any pending tasks. And inside createRunnable()'s run method, in finally block,
we try to dispatch as many events as we can in 2 seconds.
bq. If any exception happens when publish one entity
(publishWithoutBlockingOnQueue), the thread exists
This makes sense. I think we should catch the exception so that thread does not
exit.
> Issues in async API of TimelineClient
> -------------------------------------
>
> Key: YARN-6342
> URL: https://issues.apache.org/jira/browse/YARN-6342
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Jian He
>
> Found these with [~rohithsharma] while browsing the code
> - In stop: it calls shutdownNow which doens't wait for pending tasks, should
> it use shutdown instead ?
> {code}
> public void stop() {
> LOG.info("Stopping TimelineClient.");
> executor.shutdownNow();
> try {
> executor.awaitTermination(DRAIN_TIME_PERIOD, TimeUnit.MILLISECONDS);
> } catch (InterruptedException e) {
> {code}
> - In TimelineClientImpl#createRunnable:
> If any exception happens when publish one entity
> (publishWithoutBlockingOnQueue), the thread exists. I think it should try
> best effort to continue publishing the timeline entities, one failure should
> not cause all followup entities not published.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]