YARN-2907. SchedulerNode#toString should print all resource detail instead of only memory. (Contributed by Rohith)
This commit is contained in:
parent
1556f86a31
commit
c732ed760e
@ -101,6 +101,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 void reserveResource(SchedulerApplicationAttempt attempt,
|
||||
@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 void testSchedulerRecovery() throws Exception {
|
||||
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
Block a user