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