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 Allocation allocate(ApplicationAttemptId attemptId,
|
||||
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 Allocation allocate(ApplicationAttemptId attemptId,
|
||||
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
Block a user