From e4320305d3f9b2d85fd9e6079a72b9418a920cfa Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Mon, 27 Mar 2017 11:23:41 +0900 Subject: [PATCH] YARN-6379. Remove unused argument in ClientRMService. Contributed by Kai Sasaki. (cherry picked from commit b63ae854f9f5a900ca860dcb26c30785af32bde0) --- .../server/resourcemanager/ClientRMService.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java index 3ee13ebdd50..aeacd2eed88 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java @@ -1155,7 +1155,7 @@ public class ClientRMService extends AbstractService implements @Override public GetNewReservationResponse getNewReservation( GetNewReservationRequest request) throws YarnException, IOException { - checkReservationSystem(AuditConstants.CREATE_NEW_RESERVATION_REQUEST); + checkReservationSystem(); GetNewReservationResponse response = recordFactory.newRecordInstance(GetNewReservationResponse.class); @@ -1169,7 +1169,7 @@ public class ClientRMService extends AbstractService implements public ReservationSubmissionResponse submitReservation( ReservationSubmissionRequest request) throws YarnException, IOException { // Check if reservation system is enabled - checkReservationSystem(AuditConstants.SUBMIT_RESERVATION_REQUEST); + checkReservationSystem(); ReservationSubmissionResponse response = recordFactory.newRecordInstance(ReservationSubmissionResponse.class); ReservationId reservationId = request.getReservationId(); @@ -1228,7 +1228,7 @@ public class ClientRMService extends AbstractService implements public ReservationUpdateResponse updateReservation( ReservationUpdateRequest request) throws YarnException, IOException { // Check if reservation system is enabled - checkReservationSystem(AuditConstants.UPDATE_RESERVATION_REQUEST); + checkReservationSystem(); ReservationUpdateResponse response = recordFactory.newRecordInstance(ReservationUpdateResponse.class); // Validate the input @@ -1267,7 +1267,7 @@ public class ClientRMService extends AbstractService implements public ReservationDeleteResponse deleteReservation( ReservationDeleteRequest request) throws YarnException, IOException { // Check if reservation system is enabled - checkReservationSystem(AuditConstants.DELETE_RESERVATION_REQUEST); + checkReservationSystem(); ReservationDeleteResponse response = recordFactory.newRecordInstance(ReservationDeleteResponse.class); // Validate the input @@ -1306,7 +1306,7 @@ public class ClientRMService extends AbstractService implements public ReservationListResponse listReservations( ReservationListRequest requestInfo) throws YarnException, IOException { // Check if reservation system is enabled - checkReservationSystem(AuditConstants.LIST_RESERVATION_REQUEST); + checkReservationSystem(); ReservationListResponse response = recordFactory.newRecordInstance(ReservationListResponse.class); @@ -1381,7 +1381,8 @@ public class ClientRMService extends AbstractService implements return response; } - private void checkReservationSystem(String auditConstant) throws YarnException { + private void checkReservationSystem() + throws YarnException { // Check if reservation is enabled if (reservationSystem == null) { throw RPCUtil.getRemoteException("Reservation is not enabled."