YARN-850. Rename getClusterAvailableResources to getAvailableResources in AMRMClients (Jian He via bikas)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1494309 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bikas Saha 2013-06-18 21:14:28 +00:00
parent 1c309f763b
commit 40cab68409
6 changed files with 10 additions and 7 deletions

View File

@ -196,6 +196,9 @@ Release 2.1.0-beta - UNRELEASED
YARN-841. Move Auxiliary service to yarn-api, annotate and document it. YARN-841. Move Auxiliary service to yarn-api, annotate and document it.
(vinodkv) (vinodkv)
YARN-850. Rename getClusterAvailableResources to getAvailableResources in
AMRMClients (Jian He via bikas)
NEW FEATURES NEW FEATURES
YARN-482. FS: Extend SchedulingMode to intermediate queues. YARN-482. FS: Extend SchedulingMode to intermediate queues.

View File

@ -225,7 +225,7 @@ public abstract void unregisterApplicationMaster(FinalApplicationStatus appStatu
* A valid value is available after a call to allocate has been made * A valid value is available after a call to allocate has been made
* @return Currently available resources * @return Currently available resources
*/ */
public abstract Resource getClusterAvailableResources(); public abstract Resource getAvailableResources();
/** /**
* Get the current number of nodes in the cluster. * Get the current number of nodes in the cluster.

View File

@ -189,7 +189,7 @@ public abstract void unregisterApplicationMaster(
* A valid value is available after a call to allocate has been made * A valid value is available after a call to allocate has been made
* @return Currently available resources * @return Currently available resources
*/ */
public abstract Resource getClusterAvailableResources(); public abstract Resource getAvailableResources();
/** /**
* Get the current number of nodes in the cluster. * Get the current number of nodes in the cluster.

View File

@ -203,8 +203,8 @@ public void releaseAssignedContainer(ContainerId containerId) {
* A valid value is available after a call to allocate has been made * A valid value is available after a call to allocate has been made
* @return Currently available resources * @return Currently available resources
*/ */
public Resource getClusterAvailableResources() { public Resource getAvailableResources() {
return client.getClusterAvailableResources(); return client.getAvailableResources();
} }
/** /**

View File

@ -380,7 +380,7 @@ public synchronized void releaseAssignedContainer(ContainerId containerId) {
} }
@Override @Override
public synchronized Resource getClusterAvailableResources() { public synchronized Resource getAvailableResources() {
return clusterAvailableResources; return clusterAvailableResources;
} }

View File

@ -95,7 +95,7 @@ public AllocateResponse answer(InvocationOnMock invocation)
}).thenReturn(emptyResponse); }).thenReturn(emptyResponse);
when(client.registerApplicationMaster(anyString(), anyInt(), anyString())) when(client.registerApplicationMaster(anyString(), anyInt(), anyString()))
.thenReturn(null); .thenReturn(null);
when(client.getClusterAvailableResources()).thenAnswer(new Answer<Resource>() { when(client.getAvailableResources()).thenAnswer(new Answer<Resource>() {
@Override @Override
public Resource answer(InvocationOnMock invocation) public Resource answer(InvocationOnMock invocation)
throws Throwable { throws Throwable {
@ -123,7 +123,7 @@ public Resource answer(InvocationOnMock invocation)
// heartbeat will be blocked. make sure we can call client methods at this // heartbeat will be blocked. make sure we can call client methods at this
// time. Checks that heartbeat is not holding onto client lock // time. Checks that heartbeat is not holding onto client lock
assert(secondHeartbeatSync.get() < 2); assert(secondHeartbeatSync.get() < 2);
asyncClient.getClusterAvailableResources(); asyncClient.getAvailableResources();
// method returned. now unblock heartbeat // method returned. now unblock heartbeat
assert(secondHeartbeatSync.get() < 2); assert(secondHeartbeatSync.get() < 2);
synchronized (heartbeatBlock) { synchronized (heartbeatBlock) {