YARN-4825. Remove redundant code in ClientRMService::listReservations. (subru via asuresh)
(cherry picked from commit d82e797b65
)
This commit is contained in:
parent
782db43d18
commit
3c2b610b68
|
@ -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<ReservationAllocation> reservations;
|
||||
|
||||
reservations = plan.getReservations(requestedId, new ReservationInterval(
|
||||
reservations = plan.getReservations(reservationId, new ReservationInterval(
|
||||
startTime, endTime));
|
||||
|
||||
List<ReservationAllocationState> info =
|
||||
|
|
Loading…
Reference in New Issue