YARN-4825. Remove redundant code in ClientRMService::listReservations. (subru via asuresh)
(cherry picked from commit d82e797b652f248e238bdf1818e6b4a5b91cea7a)
This commit is contained in:
parent
782db43d18
commit
3c2b610b68
@ -1357,20 +1357,13 @@ public ReservationListResponse listReservations(
|
|||||||
checkReservationACLs(requestInfo.getQueue(),
|
checkReservationACLs(requestInfo.getQueue(),
|
||||||
AuditConstants.LIST_RESERVATION_REQUEST, reservationId);
|
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 startTime = Math.max(requestInfo.getStartTime(), 0);
|
||||||
long endTime = requestInfo.getEndTime() <= -1? Long.MAX_VALUE : requestInfo
|
long endTime = requestInfo.getEndTime() <= -1? Long.MAX_VALUE : requestInfo
|
||||||
.getEndTime();
|
.getEndTime();
|
||||||
|
|
||||||
Set<ReservationAllocation> reservations;
|
Set<ReservationAllocation> reservations;
|
||||||
|
|
||||||
reservations = plan.getReservations(requestedId, new ReservationInterval(
|
reservations = plan.getReservations(reservationId, new ReservationInterval(
|
||||||
startTime, endTime));
|
startTime, endTime));
|
||||||
|
|
||||||
List<ReservationAllocationState> info =
|
List<ReservationAllocationState> info =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user