HDFS-7875. Improve log message when wrong value configured for dfs.datanode.failed.volumes.tolerated. Contributed by Nijel.
(cherry picked from commit 2da3d2ed2ff2e9b48dbda7e029aa58261c729d35)
This commit is contained in:
parent
95bde88986
commit
608ad6c2cd
|
@ -8,6 +8,10 @@ Release 2.8.0 - UNRELEASED
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
|
HDFS-7875. Improve log message when wrong value configured for
|
||||||
|
dfs.datanode.failed.volumes.tolerated.
|
||||||
|
(nijel via harsh)
|
||||||
|
|
||||||
HDFS-2360. Ugly stacktrace when quota exceeds. (harsh)
|
HDFS-2360. Ugly stacktrace when quota exceeds. (harsh)
|
||||||
|
|
||||||
HDFS-7835. make initial sleeptime in locateFollowingBlock configurable for
|
HDFS-7835. make initial sleeptime in locateFollowingBlock configurable for
|
||||||
|
|
|
@ -278,8 +278,10 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
||||||
this.validVolsRequired = volsConfigured - volFailuresTolerated;
|
this.validVolsRequired = volsConfigured - volFailuresTolerated;
|
||||||
|
|
||||||
if (volFailuresTolerated < 0 || volFailuresTolerated >= volsConfigured) {
|
if (volFailuresTolerated < 0 || volFailuresTolerated >= volsConfigured) {
|
||||||
throw new DiskErrorException("Invalid volume failure "
|
throw new DiskErrorException("Invalid value configured for "
|
||||||
+ " config value: " + volFailuresTolerated);
|
+ "dfs.datanode.failed.volumes.tolerated - " + volFailuresTolerated
|
||||||
|
+ ". Value configured is either less than 0 or >= "
|
||||||
|
+ "to the number of configured volumes (" + volsConfigured + ").");
|
||||||
}
|
}
|
||||||
if (volsFailed > volFailuresTolerated) {
|
if (volsFailed > volFailuresTolerated) {
|
||||||
throw new DiskErrorException("Too many failed volumes - "
|
throw new DiskErrorException("Too many failed volumes - "
|
||||||
|
|
Loading…
Reference in New Issue