YARN-4825. Remove redundant code in ClientRMService::listReservations. (subru via asuresh)
This commit is contained in:
parent
b1394d6307
commit
d82e797b65
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user