[
https://issues.apache.org/jira/browse/HDFS-4261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510849#comment-13510849
]
Tsz Wo (Nicholas), SZE commented on HDFS-4261:
----------------------------------------------
You are right. It cannot be changed to non-static. How about moving
notChangedIterations to NameNodeConnector? If we do it, we may as well move
the related code.
{code}
//NameNodeConnector
static final int MAX_NOT_CHANGED_INTERATIONS = 5;
private int notChangedIterations = 0;
boolean shouldContinue(long dispatchBlockMoveBytes) {
if (dispatchBlockMoveBytes > 0) {
notChangedIterations = 0;
} else {
notChangedIterations++;
if (notChangedIterations >= MAX_NOT_CHANGED_INTERATIONS) {
System.out.println("No block has been moved for "
+ notChangedIterations + " iterations. Exiting...");
return false;
}
}
return true;
}
{code}
> TestBalancerWithNodeGroup times out
> -----------------------------------
>
> Key: HDFS-4261
> URL: https://issues.apache.org/jira/browse/HDFS-4261
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Affects Versions: 1.0.4, 1.1.1, 2.0.2-alpha
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Junping Du
> Attachments: HDFS-4261.patch, HDFS-4261-v2.patch
>
>
> When I manually ran TestBalancerWithNodeGroup, it always timed out in my
> machine. Looking at the Jerkins report [build
> #3573|https://builds.apache.org/job/PreCommit-HDFS-Build/3573//testReport/org.apache.hadoop.hdfs.server.balancer/],
> TestBalancerWithNodeGroup somehow was skipped so that the problem was not
> detected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira