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

Sandy Ryza commented on YARN-366:
---------------------------------

bq. Let's make it a class-name

Sounds good.

bq. I don't like how we are passing configuration around in the 
ContainerManagerImpl constructor, we have Service.init(Configuration) exactly 
for this purpose.

This is what I tried first, but I came across the following problem, stemming 
from the fact that both WebServer and ContainerManager have a a 
ContainersMonitor:
* ContainerManager needs to pass its dispatcher to its ContainersMonitor when 
it instantiates it.
* To address this, we can instantiate ContainersMonitor in ContainerManager's 
init instead of its constructor.
* The way that composite services work, parent service inits tend to happen 
before child service inits.
* In NodeManager's init method, it instantiates a WebServer, which takes a 
ContainersMonitor as an argument.
* Because of the above, the NodeManager's ContainerManager's ContainersMonitor 
will not be instantiated yet.

To work around this, we'd need to do something like move the hierarchy around a 
little or set the WebServer's ContainersMonitor separately from the WebServer's 
instantiation.  What do you think?
                
> Add a tracing async dispatcher to simplify debugging
> ----------------------------------------------------
>
>                 Key: YARN-366
>                 URL: https://issues.apache.org/jira/browse/YARN-366
>             Project: Hadoop YARN
>          Issue Type: New Feature
>          Components: nodemanager, resourcemanager
>    Affects Versions: 2.0.2-alpha
>            Reporter: Sandy Ryza
>            Assignee: Sandy Ryza
>         Attachments: YARN-366-1.patch, YARN-366-2.patch, YARN-366.patch
>
>
> Exceptions thrown in YARN/MR code with asynchronous event handling do not 
> contain informative stack traces, as all handle() methods sit directly under 
> the dispatcher thread's loop.
> This makes errors very difficult to debug for those who are not intimately 
> familiar with the code, as it is difficult to see which chain of events 
> caused a particular outcome.
> I propose adding an AsyncDispatcher that instruments events with tracing 
> information.  Whenever an event is dispatched during the handling of another 
> event, the dispatcher would annotate that event with a pointer to its parent. 
>  When the dispatcher catches an exception, it could reconstruct a "stack" 
> trace of the chain of events that led to it, and be able to log something 
> informative.
> This would be an experimental feature, off by default, unless extensive 
> testing showed that it did not have a significant performance impact.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to