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,
|
containerIds, strings,
|
||||||
strings2, updateRequests);
|
strings2, updateRequests);
|
||||||
return allocation;
|
return allocation;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error("Caught exception from allocate", e);
|
||||||
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
context.stop();
|
context.stop();
|
||||||
schedulerMetrics.increaseSchedulerAllocationCounter();
|
schedulerMetrics.increaseSchedulerAllocationCounter();
|
||||||
|
@ -111,6 +111,9 @@ public Allocation allocate(ApplicationAttemptId attemptId,
|
|||||||
schedulingRequests, containerIds,
|
schedulingRequests, containerIds,
|
||||||
blacklistAdditions, blacklistRemovals, updateRequests);
|
blacklistAdditions, blacklistRemovals, updateRequests);
|
||||||
return allocation;
|
return allocation;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error("Caught exception from allocate", e);
|
||||||
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
context.stop();
|
context.stop();
|
||||||
schedulerMetrics.increaseSchedulerAllocationCounter();
|
schedulerMetrics.increaseSchedulerAllocationCounter();
|
||||||
|
Loading…
Reference in New Issue
Block a user