hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Wendell <pwend...@gmail.com>
Subject Event Model Questions
Date Tue, 13 Dec 2011 04:45:56 GMT
Two questions about the event-based design pattern:

1) Sometimes I see a class directly calling the event handler of
another class rather than going through the dispatcher. Why do these
direct calls occur - it seems strange to go through an event here if
it's possible to call directly?
 // Inform the container
        new RMContainerEvent(container.getId(), RMContainerEventType.START));

2) The fair scheduler has some maintenance tasks that need to occur
every ~.5 seconds or so. We used to spawn a thread to do this, but the
dispatcher complains if it is interrupted by another thread. Is there
a reason why the dispatcher dies in this case? It doesn't seem like it
would be possible to replicate this periodicity with events, given
that an event cannot be enqueued with a time delay. We could probably
just check a timer value and perform the task when the timer has
expired, but this will arbitrarily slow down some requests.

- Patrick

View raw message