From 3c2b610b685ec9facbe38be30593f32a769ba411 Mon Sep 17 00:00:00 2001 From: Arun Suresh Date: Thu, 24 Mar 2016 09:59:55 -0700 Subject: [PATCH] YARN-4825. Remove redundant code in ClientRMService::listReservations. (subru via asuresh) (cherry picked from commit d82e797b652f248e238bdf1818e6b4a5b91cea7a) --- .../yarn/server/resourcemanager/ClientRMService.java | 9 +-------- 1 file changed, 1 insertion(+), 8 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 36d10334f2d..57aebbf5b31 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 @@ -1357,20 +1357,13 @@ public class ClientRMService extends AbstractService implements checkReservationACLs(requestInfo.getQueue(), AuditConstants.LIST_RESERVATION_REQUEST, reservationId); - ReservationId requestedId = null; - if (requestInfo.getReservationId() != null - && !requestInfo.getReservationId().isEmpty()) { - requestedId = ReservationId.parseReservationId(requestInfo - .getReservationId()); - } - long startTime = Math.max(requestInfo.getStartTime(), 0); long endTime = requestInfo.getEndTime() <= -1? Long.MAX_VALUE : requestInfo .getEndTime(); Set reservations; - reservations = plan.getReservations(requestedId, new ReservationInterval( + reservations = plan.getReservations(reservationId, new ReservationInterval( startTime, endTime)); List info =