HDFS-4382. Fix typo MAX_NOT_CHANGED_INTERATIONS. Contributed by Ted Yu.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1431726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d7c48409e3
commit
be5509c537
@ -297,6 +297,8 @@ Trunk (Unreleased)
|
||||
HDFS-4261. Fix bugs in Balaner causing infinite loop and
|
||||
TestBalancerWithNodeGroup timeing out. (Junping Du via szetszwo)
|
||||
|
||||
HDFS-4382. Fix typo MAX_NOT_CHANGED_INTERATIONS. (Ted Yu via suresh)
|
||||
|
||||
Release 2.0.3-alpha - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -190,7 +190,7 @@ public class Balancer {
|
||||
* balancing purpose at a datanode
|
||||
*/
|
||||
public static final int MAX_NUM_CONCURRENT_MOVES = 5;
|
||||
public static final int MAX_NO_PENDING_BLOCK_INTERATIONS = 5;
|
||||
private static final int MAX_NO_PENDING_BLOCK_ITERATIONS = 5;
|
||||
|
||||
private static final String USAGE = "Usage: java "
|
||||
+ Balancer.class.getSimpleName()
|
||||
@ -782,7 +782,7 @@ private void dispatchBlocks() {
|
||||
noPendingBlockIteration++;
|
||||
// in case no blocks can be moved for source node's task,
|
||||
// jump out of while-loop after 5 iterations.
|
||||
if (noPendingBlockIteration >= MAX_NO_PENDING_BLOCK_INTERATIONS) {
|
||||
if (noPendingBlockIteration >= MAX_NO_PENDING_BLOCK_ITERATIONS) {
|
||||
scheduledSize = 0;
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
class NameNodeConnector {
|
||||
private static final Log LOG = Balancer.LOG;
|
||||
private static final Path BALANCER_ID_PATH = new Path("/system/balancer.id");
|
||||
private static final int MAX_NOT_CHANGED_INTERATIONS = 5;
|
||||
private static final int MAX_NOT_CHANGED_ITERATIONS = 5;
|
||||
|
||||
final URI nameNodeUri;
|
||||
final String blockpoolID;
|
||||
@ -127,7 +127,7 @@ boolean shouldContinue(long dispatchBlockMoveBytes) {
|
||||
notChangedIterations = 0;
|
||||
} else {
|
||||
notChangedIterations++;
|
||||
if (notChangedIterations >= MAX_NOT_CHANGED_INTERATIONS) {
|
||||
if (notChangedIterations >= MAX_NOT_CHANGED_ITERATIONS) {
|
||||
System.out.println("No block has been moved for "
|
||||
+ notChangedIterations + " iterations. Exiting...");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user