hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naganarasimha G R (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (YARN-3367) Replace starting a separate thread for post entity with event loop in TimelineClient
Date Sun, 06 Dec 2015 18:37:11 GMT

     [ https://issues.apache.org/jira/browse/YARN-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Naganarasimha G R updated YARN-3367:
    Attachment: YARN-3367-feature-YARN-2928.v1.002.patch

Thanks for the clarification [~djp],
So IIUC from your reply, can i take ur answer to my query ??Is it req to ensure all the async
events are also pushed along with the current sync event?? as yes. ?

Also can you take a look at other 4 queries which i had [posted|https://issues.apache.org/jira/browse/YARN-3367?focusedCommentId=14732065&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14732065]
initially ?

bq. Btw, Cancel the patch as it is out of sync with new branch.
Not sure why it failed, but was able to successfully apply in my local branch! recreating
the patch and uploading it again.

bq. I looked at the patch. One general comment is that, the logic of TimelineEntityAsyncDispatcher
is pretty similar to AsyncDispatcher. Since the code segments that handling concurrency is
normally considered as non-trivial, maybe we should refactor AsycnDispatcher's code and reuse
it, rather than follow the logic here?
There are 2 aspects to consider
* Basically we would require some parameterized generic class here so that the queue can be
not just be holding {{Event}} instead any object. But the problem is we are doing this in
a branch and we introduce it, then all the places where we are using AsyncDispatcher might
require change which could be cumbersome to merge as changes would be at many places!
* Also based on the [~djp]'s comment need to add additional logic to ensure that sync puts
are blocked till all events till sync events are pushed. All these needs to be handled in
the AsyncDispatcher

Considering this my opinion would, *not*  to modify the AsyncDispatcher, Thoughts?

> Replace starting a separate thread for post entity with event loop in TimelineClient
> ------------------------------------------------------------------------------------
>                 Key: YARN-3367
>                 URL: https://issues.apache.org/jira/browse/YARN-3367
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Junping Du
>            Assignee: Naganarasimha G R
>              Labels: yarn-2928-1st-milestone
>         Attachments: YARN-3367-feature-YARN-2928.v1.002.patch, YARN-3367.YARN-2928.001.patch
> Since YARN-3039, we add loop in TimelineClient to wait for collectorServiceAddress ready
before posting any entity. In consumer of  TimelineClient (like AM), we are starting a new
thread for each call to get rid of potential deadlock in main thread. This way has at least
3 major defects:
> 1. The consumer need some additional code to wrap a thread before calling putEntities()
in TimelineClient.
> 2. It cost many thread resources which is unnecessary.
> 3. The sequence of events could be out of order because each posting operation thread
get out of waiting loop randomly.
> We should have something like event loop in TimelineClient side, putEntities() only put
related entities into a queue of entities and a separated thread handle to deliver entities
in queue to collector via REST call.

This message was sent by Atlassian JIRA

View raw message