YARN-4825. Remove redundant code in ClientRMService::listReservations. (subru via asuresh)

(cherry picked from commit d82e797b65)
This commit is contained in:
Arun Suresh 2016-03-24 09:59:55 -07:00
parent 782db43d18
commit 3c2b610b68
1 changed files with 1 additions and 8 deletions

View File

@ -1357,20 +1357,13 @@ public ReservationListResponse listReservations(
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<ReservationAllocation> reservations;
reservations = plan.getReservations(requestedId, new ReservationInterval(
reservations = plan.getReservations(reservationId, new ReservationInterval(
startTime, endTime));
List<ReservationAllocationState> info =