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

Sandy Ryza commented on YARN-417:
---------------------------------

Sorry, good point.  The patch is a work in progress and any feedback, 
especially from those who have built AMs, would be greatly appreciated.  The 
patch defines a simple Heartbeater, which spawns a thread to sends heartbeats 
to the AM at a user-defined interval.  The user uses AMRMClient to submit its 
resource requests, and the Heartbeater uses it to ship off these requests on 
the next heartbeat.

The Heartbeater takes a user-implemented AllocationListener (maybe need a 
better name?), which supports three callbacks:
allocationResponse - called on every heartbeat with the full response from the 
RM
containersCompleted - called when the RM returns containers completed with a 
list of ContainerStatuses
containersAllocated - called when the RM returns containers for use with a list 
of Containers

I hope that makes things a little clearer.
                
> 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: YARN-417.patch
>
>
> 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

Reply via email to