YARN-1632. TestApplicationMasterServices should be under org.apache.hadoop.yarn.server.resourcemanager package (Chen He via jeagles)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1563157 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7039b776c6
commit
5d4bd6a15a
@ -140,6 +140,9 @@ Release 2.4.0 - UNRELEASED
|
|||||||
|
|
||||||
YARN-1642. RMDTRenewer#getRMClient should use ClientRMProxy (kasha)
|
YARN-1642. RMDTRenewer#getRMClient should use ClientRMProxy (kasha)
|
||||||
|
|
||||||
|
YARN-1632. TestApplicationMasterServices should be under
|
||||||
|
org.apache.hadoop.yarn.server.resourcemanager package (Chen He via jeagles)
|
||||||
|
|
||||||
Release 2.3.0 - UNRELEASED
|
Release 2.3.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -16,28 +16,21 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.server.resourcemanager.applicationmasterservice;
|
package org.apache.hadoop.yarn.server.resourcemanager;
|
||||||
|
|
||||||
import junit.framework.Assert;
|
import junit.framework.Assert;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
|
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse;
|
|
||||||
import org.apache.hadoop.yarn.api.records.Container;
|
import org.apache.hadoop.yarn.api.records.Container;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||||
import org.apache.hadoop.yarn.exceptions.InvalidContainerReleaseException;
|
import org.apache.hadoop.yarn.exceptions.InvalidContainerReleaseException;
|
||||||
import org.apache.hadoop.yarn.exceptions.InvalidResourceRequestException;
|
|
||||||
import org.apache.hadoop.yarn.security.ContainerTokenIdentifier;
|
import org.apache.hadoop.yarn.security.ContainerTokenIdentifier;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.MockAM;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.MockNM;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.MockRM;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.TestFifoScheduler;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
|
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler;
|
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
|
||||||
import org.apache.hadoop.yarn.server.utils.BuilderUtils;
|
import org.apache.hadoop.yarn.server.utils.BuilderUtils;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
@ -152,33 +145,4 @@ public void testInvalidContainerReleaseRequest() throws Exception {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test (timeout = 60000)
|
|
||||||
public void testNotifyAMOfPlacedQueue() throws Exception {
|
|
||||||
// By default, FairScheduler assigns queue by user name
|
|
||||||
conf.setClass(YarnConfiguration.RM_SCHEDULER, FairScheduler.class,
|
|
||||||
ResourceScheduler.class);
|
|
||||||
MockRM rm = new MockRM(conf);
|
|
||||||
try {
|
|
||||||
rm.start();
|
|
||||||
|
|
||||||
// Register node1
|
|
||||||
MockNM nm1 = rm.registerNode("127.0.0.1:1234", 6 * GB);
|
|
||||||
|
|
||||||
// Submit an application
|
|
||||||
RMApp app1 = rm.submitApp(1024, "somename", "user1");
|
|
||||||
|
|
||||||
// kick the scheduling
|
|
||||||
nm1.nodeHeartbeat(true);
|
|
||||||
RMAppAttempt attempt1 = app1.getCurrentAppAttempt();
|
|
||||||
MockAM am1 = rm.sendAMLaunched(attempt1.getAppAttemptId());
|
|
||||||
|
|
||||||
RegisterApplicationMasterResponse response = am1.registerAppAttempt();
|
|
||||||
Assert.assertEquals("root.user1", response.getQueue());
|
|
||||||
} finally {
|
|
||||||
if (rm != null) {
|
|
||||||
rm.stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user