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:
parent
e8585afa03
commit
20fd61951b
|
@ -103,6 +103,9 @@ Release 2.0.5-beta - UNRELEASED
|
||||||
the datanode with the most recent heartbeat as the primary. (Varun Sharma
|
the datanode with the most recent heartbeat as the primary. (Varun Sharma
|
||||||
via szetszwo)
|
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
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -64,6 +64,16 @@ public class AvailableSpaceVolumeChoosingPolicy<V extends FsVolumeSpi>
|
||||||
" = " + balancedSpaceThreshold + ", " +
|
" = " + balancedSpaceThreshold + ", " +
|
||||||
DFS_DATANODE_FSDATASET_VOLUME_CHOOSING_BALANCED_SPACE_PREFERENCE_PERCENT_KEY +
|
DFS_DATANODE_FSDATASET_VOLUME_CHOOSING_BALANCED_SPACE_PREFERENCE_PERCENT_KEY +
|
||||||
" = " + balancedPreferencePercent);
|
" = " + 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
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue