[ 
https://issues.apache.org/jira/browse/HDFS-13783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16893983#comment-16893983
 ] 

Erik Krogen commented on HDFS-13783:
------------------------------------

It looks like {{TestDirectoryScanner}} is already tracked in HDFS-14669.

The new methods added for monitoring look great! I think we can actually 
leverage this to make the test more robust and run faster:
{code}
      Thread.sleep(10000);
      assertTrue(Balancer.getExceptionsSinceLastBalance() > 0);
{code}
we should be able to replace this with:
{code}
GenericTestUtils.waitFor(() -> Balancer.getExceptionsSinceLastBalance() > 0, 
1000, 20000);
{code}
Also, the newly added fields should probably be {{volatile}} since they may be 
accessed from a thread besides the one that is doing the updating.

Other than this, we still need to fix the checkstyle. I usually use the diff 
report produced by Jenkins:
{code}
checkstyle      
https://builds.apache.org/job/PreCommit-HDFS-Build/27297/artifact/out/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
{code}
This shows only the diff and not any existing issues. You can also do this 
yourself using the 
[{{test-patch}}|https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute#HowToContribute-Testingyourpatch]
 script included in the repo.

> Balancer: make balancer to be a long service process for easy to monitor it.
> ----------------------------------------------------------------------------
>
>                 Key: HDFS-13783
>                 URL: https://issues.apache.org/jira/browse/HDFS-13783
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: balancer & mover
>            Reporter: maobaolong
>            Assignee: Chen Zhang
>            Priority: Major
>         Attachments: HDFS-13783-001.patch, HDFS-13783-002.patch, 
> HDFS-13783.003.patch, HDFS-13783.004.patch, HDFS-13783.005.patch
>
>
> If we have a long service process of balancer, like namenode, datanode, we 
> can get metrics of balancer, the metrics can tell us the status of balancer, 
> the amount of block it has moved, 
> We can get or set the balance plan by the balancer webUI. So many things we 
> can do if we have a long balancer service process.
> So, shall we start to plan the new Balancer? Hope this feature can enter the 
> next release of hadoop.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to