Search in sources :

Example 6 with MoveApplicationAcrossQueuesRequest

use of org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest in project hadoop by apache.

the class TestClientRMService method testNonExistingQueue.

@Test(expected = YarnException.class)
public void testNonExistingQueue() throws Exception {
    ApplicationId applicationId = getApplicationId(1);
    UserGroupInformation aclUGI = UserGroupInformation.getCurrentUser();
    QueueACLsManager queueAclsManager = getQueueAclManager();
    ApplicationACLsManager appAclsManager = getAppAclManager();
    ClientRMService rmService = createClientRMServiceForMoveApplicationRequest(applicationId, aclUGI.getShortUserName(), appAclsManager, queueAclsManager);
    MoveApplicationAcrossQueuesRequest moveAppRequest = MoveApplicationAcrossQueuesRequest.newInstance(applicationId, "unknown_queue");
    rmService.moveApplicationAcrossQueues(moveAppRequest);
}
Also used : ApplicationACLsManager(org.apache.hadoop.yarn.server.security.ApplicationACLsManager) MoveApplicationAcrossQueuesRequest(org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest) QueueACLsManager(org.apache.hadoop.yarn.server.resourcemanager.security.QueueACLsManager) ApplicationId(org.apache.hadoop.yarn.api.records.ApplicationId) UserGroupInformation(org.apache.hadoop.security.UserGroupInformation) Test(org.junit.Test)

Aggregations

MoveApplicationAcrossQueuesRequest (org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest)6 ApplicationId (org.apache.hadoop.yarn.api.records.ApplicationId)5 Test (org.junit.Test)4 IOException (java.io.IOException)3 AccessControlException (java.security.AccessControlException)3 UserGroupInformation (org.apache.hadoop.security.UserGroupInformation)3 YarnException (org.apache.hadoop.yarn.exceptions.YarnException)3 QueueACLsManager (org.apache.hadoop.yarn.server.resourcemanager.security.QueueACLsManager)3 ApplicationACLsManager (org.apache.hadoop.yarn.server.security.ApplicationACLsManager)3 BrokenBarrierException (java.util.concurrent.BrokenBarrierException)2 ApplicationNotFoundException (org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException)2 Matchers.anyString (org.mockito.Matchers.anyString)2 UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 RMApp (org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp)1 AppQueue (org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppQueue)1