YARN-2907. SchedulerNode#toString should print all resource detail instead of only memory. (Contributed by Rohith)
(cherry picked from commit c732ed760e
)
This commit is contained in:
parent
f4ab306347
commit
c7bd22974a
|
@ -74,6 +74,9 @@ Release 2.7.0 - UNRELEASED
|
|||
YARN-2165. Added the sanity check for the numeric configuration values of
|
||||
the timeline service. (Vasanth kumar RJ via zjshen)
|
||||
|
||||
YARN-2907. SchedulerNode#toString should print all resource detail instead
|
||||
of only memory. (Rohith via junping_du)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -242,9 +242,8 @@ public abstract class SchedulerNode {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "host: " + rmNode.getNodeAddress() + " #containers="
|
||||
+ getNumContainers() + " available="
|
||||
+ getAvailableResource().getMemory() + " used="
|
||||
+ getUsedResource().getMemory();
|
||||
+ getNumContainers() + " available=" + getAvailableResource()
|
||||
+ " used=" + getUsedResource();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -214,6 +214,14 @@ public class TestWorkPreservingRMRestart {
|
|||
AbstractYarnScheduler scheduler =
|
||||
(AbstractYarnScheduler) rm2.getResourceScheduler();
|
||||
SchedulerNode schedulerNode1 = scheduler.getSchedulerNode(nm1.getNodeId());
|
||||
assertTrue(
|
||||
"SchedulerNode#toString is not in expected format",
|
||||
schedulerNode1
|
||||
.toString().contains(schedulerNode1.getAvailableResource().toString()));
|
||||
assertTrue(
|
||||
"SchedulerNode#toString is not in expected format",
|
||||
schedulerNode1
|
||||
.toString().contains(schedulerNode1.getUsedResource().toString()));
|
||||
|
||||
// ********* check scheduler node state.*******
|
||||
// 2 running containers.
|
||||
|
|
Loading…
Reference in New Issue