YARN-8969. AbstractYarnScheduler#getNodeTracker should return generic type to avoid type casting. Contributed by Wanqiang Ji.
This commit is contained in:
parent
f3296501e0
commit
c7fcca0d7e
@ -237,7 +237,7 @@ protected void serviceStop() throws Exception {
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public ClusterNodeTracker getNodeTracker() {
|
||||
public ClusterNodeTracker<N> getNodeTracker() {
|
||||
return nodeTracker;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ private PreemptableContainers identifyContainersToPreemptOnNode(
|
||||
|
||||
private void trackPreemptionsAgainstNode(List<RMContainer> containers,
|
||||
FSAppAttempt app) {
|
||||
FSSchedulerNode node = (FSSchedulerNode) scheduler.getNodeTracker()
|
||||
FSSchedulerNode node = scheduler.getNodeTracker()
|
||||
.getNode(containers.get(0).getNodeId());
|
||||
node.addContainersForPreemption(containers, app);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user