Search in sources :

Example 1 with RefreshQueuesResponse

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

the class TestResourceManagerAdministrationProtocolPBClientImpl method testRefreshQueues.

/**
   * Test method refreshQueues. This method is present and it works.
   */
@Test
public void testRefreshQueues() throws Exception {
    RefreshQueuesRequest request = recordFactory.newRecordInstance(RefreshQueuesRequest.class);
    RefreshQueuesResponse response = client.refreshQueues(request);
    assertNotNull(response);
}
Also used : RefreshQueuesRequest(org.apache.hadoop.yarn.server.api.protocolrecords.RefreshQueuesRequest) RefreshQueuesResponse(org.apache.hadoop.yarn.server.api.protocolrecords.RefreshQueuesResponse) Test(org.junit.Test)

Example 2 with RefreshQueuesResponse

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

the class AdminService method refreshQueues.

@Override
public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request) throws YarnException, StandbyException {
    final String operation = "refreshQueues";
    final String msg = "refresh queues.";
    UserGroupInformation user = checkAcls(operation);
    checkRMStatus(user.getShortUserName(), operation, msg);
    RefreshQueuesResponse response = recordFactory.newRecordInstance(RefreshQueuesResponse.class);
    try {
        refreshQueues();
        RMAuditLogger.logSuccess(user.getShortUserName(), operation, "AdminService");
        return response;
    } catch (IOException ioe) {
        throw logAndWrapException(ioe, user.getShortUserName(), operation, msg);
    }
}
Also used : IOException(java.io.IOException) RefreshQueuesResponse(org.apache.hadoop.yarn.server.api.protocolrecords.RefreshQueuesResponse) UserGroupInformation(org.apache.hadoop.security.UserGroupInformation)

Aggregations

RefreshQueuesResponse (org.apache.hadoop.yarn.server.api.protocolrecords.RefreshQueuesResponse)2 IOException (java.io.IOException)1 UserGroupInformation (org.apache.hadoop.security.UserGroupInformation)1 RefreshQueuesRequest (org.apache.hadoop.yarn.server.api.protocolrecords.RefreshQueuesRequest)1 Test (org.junit.Test)1