YARN-10678. Try blocks without catch blocks in SLS scheduler classes can swallow other exceptions. Contributed by Szilard Nemeth.
This commit is contained in:
parent
20416bc62d
commit
ea90cd3556
|
@ -119,6 +119,9 @@ public class SLSCapacityScheduler extends CapacityScheduler implements
|
|||
containerIds, strings,
|
||||
strings2, updateRequests);
|
||||
return allocation;
|
||||
} catch (Exception e) {
|
||||
LOG.error("Caught exception from allocate", e);
|
||||
throw e;
|
||||
} finally {
|
||||
context.stop();
|
||||
schedulerMetrics.increaseSchedulerAllocationCounter();
|
||||
|
|
|
@ -111,6 +111,9 @@ public class SLSFairScheduler extends FairScheduler
|
|||
schedulingRequests, containerIds,
|
||||
blacklistAdditions, blacklistRemovals, updateRequests);
|
||||
return allocation;
|
||||
} catch (Exception e) {
|
||||
LOG.error("Caught exception from allocate", e);
|
||||
throw e;
|
||||
} finally {
|
||||
context.stop();
|
||||
schedulerMetrics.increaseSchedulerAllocationCounter();
|
||||
|
|
Loading…
Reference in New Issue