[
https://issues.apache.org/jira/browse/HDFS-10580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352680#comment-15352680
]
Yiqun Lin commented on HDFS-10580:
----------------------------------
Thanks [~anu] for review. I run some tests I'm my local, it seems a little
noisy for me. But I think these infos will be useful for us when we want to
debug in this class. I found another problem in output infos. The output infos
were not ordered. Sometimes there will be two lines of First Volume, and then
will be Last Volume info. Like these:
{code}
2016-06-28 17:27:30,739 [pool-1-thread-1] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(263)) - First Volume : /tmp/disk/hIDn1xAOE0,
DataDensity : 0.439100
2016-06-28 17:27:30,739 [pool-1-thread-3] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(263)) - First Volume : /tmp/disk/xH5Gyutu4r,
DataDensity : 0.017900
2016-06-28 17:27:30,740 [pool-1-thread-1] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(268)) - Last Volume : /tmp/disk/lbAmdQf3Zl,
DataDensity : -0.170200
2016-06-28 17:27:30,740 [pool-1-thread-3] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(268)) - Last Volume : /tmp/disk/ZFGQuCn4Y2,
DataDensity : -0.128100
2016-06-28 17:27:30,740 [pool-1-thread-1] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(263)) - First Volume : /tmp/disk/noTvhjLIXR,
DataDensity : 0.035100
2016-06-28 17:27:30,740 [pool-1-thread-3] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(263)) - First Volume : /tmp/disk/DD1sDuwvA4,
DataDensity : 0.000100
{code}
We can reduce these two line into one line and it will reduce the output lines.
The new output from my test result:
{code}
2016-06-28 17:22:56,516 [pool-1-thread-3] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(266)) - First Volume : /tmp/disk/xH5Gyutu4r,
DataDensity : 0.104200, Last Volume : /tmp/disk/DD1sDuwvA4, DataDensity :
-0.532700
2016-06-28 17:22:56,516 [pool-1-thread-1] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(266)) - First Volume : /tmp/disk/noTvhjLIXR,
DataDensity : 0.035100, Last Volume : /tmp/disk/lbAmdQf3Zl, DataDensity :
-0.045200
2016-06-28 17:22:56,516 [pool-1-thread-3] INFO planner.GreedyPlanner
(GreedyPlanner.java:printQueue(266)) - First Volume : /tmp/disk/xH5Gyutu4r,
DataDensity : 0.017900, Last Volume : /tmp/disk/ZFGQuCn4Y2, DataDensity :
-0.128100
{code}
Post a new patch for fixing this.
> DiskBalancer : Make use of unused methods in GreedyPlanner to print debug info
> ------------------------------------------------------------------------------
>
> Key: HDFS-10580
> URL: https://issues.apache.org/jira/browse/HDFS-10580
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: balancer & mover
> Reporter: Yiqun Lin
> Assignee: Yiqun Lin
> Priority: Minor
> Attachments: HDFS-10580.001.patch
>
>
> There are two unused method {{skipVolume}} and {{printQueue}} in class
> {{GreedyPlanner}}. These two methods were added in HDFS-9469 but they are not
> used. In these two method, it will print the detail debug info. So We can
> make use of them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]