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

This commit is contained in:
Arun Suresh 2016-03-24 09:59:55 -07:00
parent b1394d6307
commit d82e797b65

View File

@ -1359,20 +1359,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 =