[
https://issues.apache.org/jira/browse/YARN-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13606643#comment-13606643
]
Sandy Ryza commented on YARN-417:
---------------------------------
bq. The client can make a call to stop() before making a call to unregister
(bad code, race in code, client got reboot from RM etc) In that case the code
may crash according to the sequence I described earlier, wont it? so the safety
of unregister having being called before stop is not guaranteed, right? Calling
client.stop() after heartbeat.join() is the right thing to do irrespective of
any safety offered by some other method call (that may or may not happen). Let
us do that unless there is a good reason not to.
I agree.
bq. There was a burden on the app to call heartbeat periodically. We are
removing that burden in this jira. A related burden was to update progress
periodically which was tied to the heartbeat. From what I see, remembering to
update the progress periodically is still a burden on the app. Is it not so?
The app does not need to update progress periodically, it only needs to update
it in response to events that would change its progress, which it needs to do
anyway. This of course can be accomplished just as easily by updating a
user-stored progress variable and returning it to a getProgress callback. The
reason that I am defending the former is that currently we have a clear
separation that callbacks are for information relayed from the RM, and
AMRMClientAsync direct method calls like newContainerRequest, setProgress, and
registerApplicationMaster are for information to the RM. Having gotten that
out, I'll accept whatever approach seems best to you, Bikas.
> Add a poller that allows the AM to receive notifications when it is assigned
> containers
> ---------------------------------------------------------------------------------------
>
> Key: YARN-417
> URL: https://issues.apache.org/jira/browse/YARN-417
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: api, applications
> Affects Versions: 2.0.3-alpha
> Reporter: Sandy Ryza
> Assignee: Sandy Ryza
> Attachments: AMRMClientAsync-1.java, AMRMClientAsync.java,
> YARN-417-1.patch, YARN-417-2.patch, YARN-417-3.patch, YARN-417-4.patch,
> YARN-417-4.patch, YARN-417.patch, YarnAppMaster.java,
> YarnAppMasterListener.java
>
>
> Writing AMs would be easier for some if they did not have to handle
> heartbeating to the RM on their own.
--
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