Hi Sandy, I need to get these updates periodically and not sure if current implementation (YarnClientImpl) of YarnClient is good for periodic updates. Are there any other async/light weight APIs?
Gaurav -----Original Message----- From: Sandy Ryza [mailto:[email protected]] Sent: Wednesday, February 12, 2014 3:20 PM To: [email protected] Subject: Re: Getting Updated Node Report from AllocateResponse You'll need to use YarnClient to request this info directly from the ResourceManager. On Wed, Feb 12, 2014 at 3:08 PM, Gaurav Gupta <[email protected]>wrote: > I am looking for the updated resources information like memory left, > Virtual Cores etc.. > > -----Original Message----- > From: Sandy Ryza [mailto:[email protected]] > Sent: Wednesday, February 12, 2014 1:19 PM > To: [email protected] > Subject: Re: Getting Updated Node Report from AllocateResponse > > What specific information about those nodes are you looking for? > > -Sandy > > > On Wed, Feb 12, 2014 at 12:21 PM, Gaurav Gupta > <[email protected]>wrote: > > > Thanks Sandy.. It helps.. > > How do I get the updated node report for the nodes that have had > > containers allocated on them? > > > > Thanks > > Gaurav > > > > -----Original Message----- > > From: Sandy Ryza [mailto:[email protected]] > > Sent: Wednesday, February 12, 2014 10:35 AM > > To: [email protected] > > Subject: Re: Getting Updated Node Report from AllocateResponse > > > > Hi Guarav, > > > > The updated nodes reported in the AllocateResponse are not those > > that have had containers allocated on them recently for the application. > > Rather, they're the ones whose status in the cluster has changed, e.g. > > those that have recently connected, become unhealthy, or disconnected. > > > > hope that helps, > > Sandy > > > > > > On Tue, Feb 11, 2014 at 11:29 AM, Gaurav Gupta > > <[email protected]>wrote: > > > > > I am using Hadoop 2.2.0 Version > > > > > > hadoop@node14:~$ hadoop version > > > Hadoop 2.2.0 > > > Subversion https://svn.apache.org/repos/asf/hadoop/common -r > > > 1529768 Compiled by hortonmu on 2013-10-07T06:28Z Compiled with > > > protoc 2.5.0 > > > > > > -----Original Message----- > > > From: Gaurav Gupta [mailto:[email protected]] > > > Sent: Tuesday, February 11, 2014 11:16 AM > > > To: [email protected] > > > Subject: Getting Updated Node Report from AllocateResponse > > > > > > Hi, > > > > > > > > > > > > I am trying to get the list of nodes whose status has been updated > > > from the AllocateResponse Obj, but I get back empty list although > > > containers are allocated to my App Master. Here is the code > > > snippet for the same > > > > > > > > > > > > for (ContainerRequest cr : containerRequests) { > > > > > > LOG.info("Requested container: {}", cr.toString()); > > > > > > amRmClient.addContainerRequest(cr); > > > > > > } > > > > > > for (ContainerId containerId : releasedContainers) { > > > > > > LOG.info("Released container, id={}", containerId.getId()); > > > > > > amRmClient.releaseAssignedContainer(containerId); > > > > > > } > > > > > > AllocateResponse amResp = amRmClient.allocate(0); > > > > > > List<Container> newAllocatedContainers = > > > amResp.getAllocatedContainers(); > > > > > > List<NodeReport> updatedNodes = amResp.getUpdatedNodes(); > > > > > > > > > > > > I always empty list in the last call. Any pointers? > > > > > > > > > > > > Thanks > > > > > > -Gaurav > > > > > > > > > > > > > > > > > > > > >
