YARN-8969. AbstractYarnScheduler#getNodeTracker should return generic type to avoid type casting. Contributed by Wanqiang Ji.
(cherry picked from commit c7fcca0d7e
)
This commit is contained in:
parent
378f189c4f
commit
b474239e0b
|
@ -237,7 +237,7 @@ public abstract class AbstractYarnScheduler
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public ClusterNodeTracker getNodeTracker() {
|
public ClusterNodeTracker<N> getNodeTracker() {
|
||||||
return nodeTracker;
|
return nodeTracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ class FSPreemptionThread extends Thread {
|
||||||
|
|
||||||
private void trackPreemptionsAgainstNode(List<RMContainer> containers,
|
private void trackPreemptionsAgainstNode(List<RMContainer> containers,
|
||||||
FSAppAttempt app) {
|
FSAppAttempt app) {
|
||||||
FSSchedulerNode node = (FSSchedulerNode) scheduler.getNodeTracker()
|
FSSchedulerNode node = scheduler.getNodeTracker()
|
||||||
.getNode(containers.get(0).getNodeId());
|
.getNode(containers.get(0).getNodeId());
|
||||||
node.addContainersForPreemption(containers, app);
|
node.addContainersForPreemption(containers, app);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue