HDFS-4804. WARN when users set the block balanced preference percent below 0.5 or above 1.0. Contributed by Stephen Chu.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1480099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2013-05-07 21:42:14 +00:00
parent e8585afa03
commit 20fd61951b
2 changed files with 13 additions and 0 deletions

View File

@ -103,6 +103,9 @@ Release 2.0.5-beta - UNRELEASED
the datanode with the most recent heartbeat as the primary. (Varun Sharma
via szetszwo)
HDFS-4804. WARN when users set the block balanced preference percent below
0.5 or above 1.0. (Stephen Chu via atm)
OPTIMIZATIONS
BUG FIXES

View File

@ -64,6 +64,16 @@ public class AvailableSpaceVolumeChoosingPolicy<V extends FsVolumeSpi>
" = " + balancedSpaceThreshold + ", " +
DFS_DATANODE_FSDATASET_VOLUME_CHOOSING_BALANCED_SPACE_PREFERENCE_PERCENT_KEY +
" = " + balancedPreferencePercent);
if (balancedPreferencePercent > 1.0) {
LOG.warn("The value of " + DFS_DATANODE_FSDATASET_VOLUME_CHOOSING_BALANCED_SPACE_PREFERENCE_PERCENT_KEY +
" is greater than 1.0 but should be in the range 0.0 - 1.0");
}
if (balancedPreferencePercent < 0.5) {
LOG.warn("The value of " + DFS_DATANODE_FSDATASET_VOLUME_CHOOSING_BALANCED_SPACE_PREFERENCE_PERCENT_KEY +
" is less than 0.5 so volumes with less available disk space will receive more block allocations");
}
}
@Override