YARN-8977. Remove unnecessary type casting when calling AbstractYarnScheduler#getSchedulerNode. Contributed by Wanqiang Ji.
This commit is contained in:
parent
0b6625a973
commit
c96cbe8659
|
@ -2192,8 +2192,8 @@ public class CapacityScheduler extends
|
|||
super.completedContainer(killableContainer, SchedulerUtils
|
||||
.createPreemptedContainerStatus(killableContainer.getContainerId(),
|
||||
SchedulerUtils.PREEMPTED_CONTAINER), RMContainerEventType.KILL);
|
||||
} else{
|
||||
FiCaSchedulerNode node = (FiCaSchedulerNode) getSchedulerNode(
|
||||
} else {
|
||||
FiCaSchedulerNode node = getSchedulerNode(
|
||||
killableContainer.getAllocatedNode());
|
||||
|
||||
FiCaSchedulerApp application = getCurrentAttemptForContainer(
|
||||
|
@ -2225,7 +2225,7 @@ public class CapacityScheduler extends
|
|||
+ nonKillableContainer.toString());
|
||||
}
|
||||
|
||||
FiCaSchedulerNode node = (FiCaSchedulerNode) getSchedulerNode(
|
||||
FiCaSchedulerNode node = getSchedulerNode(
|
||||
nonKillableContainer.getAllocatedNode());
|
||||
|
||||
FiCaSchedulerApp application = getCurrentAttemptForContainer(
|
||||
|
|
|
@ -376,8 +376,7 @@ public class TestContinuousScheduling extends FairSchedulerTestBase {
|
|||
|
||||
NodeAddedSchedulerEvent nodeEvent1 = new NodeAddedSchedulerEvent(node1);
|
||||
scheduler.handle(nodeEvent1);
|
||||
FSSchedulerNode node =
|
||||
(FSSchedulerNode) scheduler.getSchedulerNode(node1.getNodeID());
|
||||
FSSchedulerNode node = scheduler.getSchedulerNode(node1.getNodeID());
|
||||
// Tick the time and let the fsApp startTime different from initScheduler
|
||||
// time
|
||||
mockClock.tickSec(delayThresholdTimeMs / 1000);
|
||||
|
|
|
@ -4557,8 +4557,7 @@ public class TestFairScheduler extends FairSchedulerTestBase {
|
|||
NodeAddedSchedulerEvent nodeEvent1 = new NodeAddedSchedulerEvent(node1);
|
||||
scheduler.handle(nodeEvent1);
|
||||
|
||||
FSSchedulerNode node = (FSSchedulerNode)scheduler.getSchedulerNode(
|
||||
node1.getNodeID());
|
||||
FSSchedulerNode node = scheduler.getSchedulerNode(node1.getNodeID());
|
||||
|
||||
NodeRemovedSchedulerEvent removeNode1 =
|
||||
new NodeRemovedSchedulerEvent(node1);
|
||||
|
|
Loading…
Reference in New Issue