YARN-8148. Update decimal values for queue capacities shown on queue status CLI. Contributed by Prabhu Joseph
This commit is contained in:
parent
263413e838
commit
14d0f9a775
@ -128,7 +128,7 @@ private void printQueueInfo(PrintWriter writer, QueueInfo queueInfo) {
|
|||||||
|
|
||||||
writer.print("\tState : ");
|
writer.print("\tState : ");
|
||||||
writer.println(queueInfo.getQueueState());
|
writer.println(queueInfo.getQueueState());
|
||||||
DecimalFormat df = new DecimalFormat("#.0");
|
DecimalFormat df = new DecimalFormat("#.00");
|
||||||
writer.print("\tCapacity : ");
|
writer.print("\tCapacity : ");
|
||||||
writer.println(df.format(queueInfo.getCapacity() * 100) + "%");
|
writer.println(df.format(queueInfo.getCapacity() * 100) + "%");
|
||||||
writer.print("\tCurrent Capacity : ");
|
writer.print("\tCurrent Capacity : ");
|
||||||
|
@ -1728,9 +1728,9 @@ public void testGetQueueInfo() throws Exception {
|
|||||||
pw.println("Queue Information : ");
|
pw.println("Queue Information : ");
|
||||||
pw.println("Queue Name : " + "queueA");
|
pw.println("Queue Name : " + "queueA");
|
||||||
pw.println("\tState : " + "RUNNING");
|
pw.println("\tState : " + "RUNNING");
|
||||||
pw.println("\tCapacity : " + "40.0%");
|
pw.println("\tCapacity : " + "40.00%");
|
||||||
pw.println("\tCurrent Capacity : " + "50.0%");
|
pw.println("\tCurrent Capacity : " + "50.00%");
|
||||||
pw.println("\tMaximum Capacity : " + "80.0%");
|
pw.println("\tMaximum Capacity : " + "80.00%");
|
||||||
pw.println("\tDefault Node Label expression : " + "GPU");
|
pw.println("\tDefault Node Label expression : " + "GPU");
|
||||||
pw.println("\tAccessible Node Labels : " + "JDK_7,GPU");
|
pw.println("\tAccessible Node Labels : " + "JDK_7,GPU");
|
||||||
pw.println("\tPreemption : " + "enabled");
|
pw.println("\tPreemption : " + "enabled");
|
||||||
@ -1895,9 +1895,9 @@ public void testGetQueueInfoWithEmptyNodeLabel() throws Exception {
|
|||||||
pw.println("Queue Information : ");
|
pw.println("Queue Information : ");
|
||||||
pw.println("Queue Name : " + "queueA");
|
pw.println("Queue Name : " + "queueA");
|
||||||
pw.println("\tState : " + "RUNNING");
|
pw.println("\tState : " + "RUNNING");
|
||||||
pw.println("\tCapacity : " + "40.0%");
|
pw.println("\tCapacity : " + "40.00%");
|
||||||
pw.println("\tCurrent Capacity : " + "50.0%");
|
pw.println("\tCurrent Capacity : " + "50.00%");
|
||||||
pw.println("\tMaximum Capacity : " + "80.0%");
|
pw.println("\tMaximum Capacity : " + "80.00%");
|
||||||
pw.println("\tDefault Node Label expression : "
|
pw.println("\tDefault Node Label expression : "
|
||||||
+ NodeLabel.DEFAULT_NODE_LABEL_PARTITION);
|
+ NodeLabel.DEFAULT_NODE_LABEL_PARTITION);
|
||||||
pw.println("\tAccessible Node Labels : ");
|
pw.println("\tAccessible Node Labels : ");
|
||||||
|
Loading…
Reference in New Issue
Block a user