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:
parent
1c309f763b
commit
40cab68409
|
@ -196,6 +196,9 @@ Release 2.1.0-beta - UNRELEASED
|
|||
YARN-841. Move Auxiliary service to yarn-api, annotate and document it.
|
||||
(vinodkv)
|
||||
|
||||
YARN-850. Rename getClusterAvailableResources to getAvailableResources in
|
||||
AMRMClients (Jian He via bikas)
|
||||
|
||||
NEW FEATURES
|
||||
|
||||
YARN-482. FS: Extend SchedulingMode to intermediate queues.
|
||||
|
|
|
@ -225,7 +225,7 @@ public abstract class AMRMClient<T extends AMRMClient.ContainerRequest> extends
|
|||
* A valid value is available after a call to allocate has been made
|
||||
* @return Currently available resources
|
||||
*/
|
||||
public abstract Resource getClusterAvailableResources();
|
||||
public abstract Resource getAvailableResources();
|
||||
|
||||
/**
|
||||
* Get the current number of nodes in the cluster.
|
||||
|
|
|
@ -189,7 +189,7 @@ extends AbstractService {
|
|||
* A valid value is available after a call to allocate has been made
|
||||
* @return Currently available resources
|
||||
*/
|
||||
public abstract Resource getClusterAvailableResources();
|
||||
public abstract Resource getAvailableResources();
|
||||
|
||||
/**
|
||||
* Get the current number of nodes in the cluster.
|
||||
|
|
|
@ -203,8 +203,8 @@ extends AMRMClientAsync<T> {
|
|||
* A valid value is available after a call to allocate has been made
|
||||
* @return Currently available resources
|
||||
*/
|
||||
public Resource getClusterAvailableResources() {
|
||||
return client.getClusterAvailableResources();
|
||||
public Resource getAvailableResources() {
|
||||
return client.getAvailableResources();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -380,7 +380,7 @@ public class AMRMClientImpl<T extends ContainerRequest> extends AMRMClient<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public synchronized Resource getClusterAvailableResources() {
|
||||
public synchronized Resource getAvailableResources() {
|
||||
return clusterAvailableResources;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public class TestAMRMClientAsync {
|
|||
}).thenReturn(emptyResponse);
|
||||
when(client.registerApplicationMaster(anyString(), anyInt(), anyString()))
|
||||
.thenReturn(null);
|
||||
when(client.getClusterAvailableResources()).thenAnswer(new Answer<Resource>() {
|
||||
when(client.getAvailableResources()).thenAnswer(new Answer<Resource>() {
|
||||
@Override
|
||||
public Resource answer(InvocationOnMock invocation)
|
||||
throws Throwable {
|
||||
|
@ -123,7 +123,7 @@ public class TestAMRMClientAsync {
|
|||
// heartbeat will be blocked. make sure we can call client methods at this
|
||||
// time. Checks that heartbeat is not holding onto client lock
|
||||
assert(secondHeartbeatSync.get() < 2);
|
||||
asyncClient.getClusterAvailableResources();
|
||||
asyncClient.getAvailableResources();
|
||||
// method returned. now unblock heartbeat
|
||||
assert(secondHeartbeatSync.get() < 2);
|
||||
synchronized (heartbeatBlock) {
|
||||
|
|
Loading…
Reference in New Issue