YARN-1451. TestResourceManager relies on the scheduler assigning multiple containers in a single node update. (Sandy Ryza via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1551440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0fc2929d13
commit
a6754bbb81
@ -255,6 +255,9 @@ Release 2.4.0 - UNRELEASED
|
||||
YARN-1145. Fixed a potential file-handle leak in the web interface for
|
||||
displaying aggregated logs. (Rohith Sharma via vinodkv)
|
||||
|
||||
YARN-1451. TestResourceManager relies on the scheduler assigning multiple
|
||||
containers in a single node update. (Sandy Ryza via kasha)
|
||||
|
||||
Release 2.3.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -79,22 +79,23 @@ public void tearDown() throws Exception {
|
||||
|
||||
@Test
|
||||
public void testResourceAllocation() throws IOException,
|
||||
YarnException {
|
||||
YarnException, InterruptedException {
|
||||
LOG.info("--- START: testResourceAllocation ---");
|
||||
|
||||
final int memory = 4 * 1024;
|
||||
final int vcores = 4;
|
||||
|
||||
// Register node1
|
||||
String host1 = "host1";
|
||||
org.apache.hadoop.yarn.server.resourcemanager.NodeManager nm1 =
|
||||
registerNode(host1, 1234, 2345, NetworkTopology.DEFAULT_RACK,
|
||||
Resources.createResource(memory, 1));
|
||||
Resources.createResource(memory, vcores));
|
||||
|
||||
// Register node2
|
||||
String host2 = "host2";
|
||||
org.apache.hadoop.yarn.server.resourcemanager.NodeManager nm2 =
|
||||
registerNode(host2, 1234, 2345, NetworkTopology.DEFAULT_RACK,
|
||||
Resources.createResource(memory/2, 1));
|
||||
Resources.createResource(memory/2, vcores/2));
|
||||
|
||||
// Submit an application
|
||||
Application application = new Application("user1", resourceManager);
|
||||
@ -142,8 +143,10 @@ public void testResourceAllocation() throws IOException,
|
||||
application.schedule();
|
||||
checkResourceUsage(nm1, nm2);
|
||||
|
||||
// Send a heartbeat to kick the tires on the Scheduler
|
||||
// Send heartbeats to kick the tires on the Scheduler
|
||||
nodeUpdate(nm2);
|
||||
nodeUpdate(nm2);
|
||||
nodeUpdate(nm1);
|
||||
nodeUpdate(nm1);
|
||||
|
||||
// Get allocations from the scheduler
|
||||
|
Loading…
Reference in New Issue
Block a user