Skip to content

Commit 130f88a

Browse files
authored
Update NameNodeResourceChecker.java
1 parent 438bd3e commit 130f88a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeResourceChecker.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,16 @@ private void addDirToCheck(URI directoryToCheck, boolean required)
176176
public boolean hasAvailableDiskSpace() {
177177
try {
178178
if (minimumRedundantVolumes > volumes.size()){
179-
throw new IllegalArgumentException(DFSConfigKeys.DFS_NAMENODE_CHECKED_VOLUMES_MINIMUM_KEY +
180-
" is " + minimumRedundantVolumes +
181-
" which is greater than the total number of existing storage volumes " + volumes.size());
179+
throw new IllegalArgumentException("The value of "
180+
+ DFSConfigKeys.DFS_NAMENODE_CHECKED_VOLUMES_MINIMUM_KEY
181+
+ " is " + minimumRedundantVolumes
182+
+ " which is greater than the total number of existing storage volumes "
183+
+ volumes.size() + " .");
182184
}
183185
} catch (IllegalArgumentException e){
184-
LOG.warn(DFSConfigKeys.DFS_NAMENODE_CHECKED_VOLUMES_MINIMUM_KEY +
185-
" is greater than the total number of existing storage volumes" +
186-
" and will result in adding resources and still not being able to turn off safe mode.", e);
186+
LOG.warn("The value of " + DFSConfigKeys.DFS_NAMENODE_CHECKED_VOLUMES_MINIMUM_KEY
187+
+ " is greater than the total number of existing storage volumes"
188+
+ " and will result in adding resources and still not being able to turn off safe mode.", e);
187189
}
188190
return NameNodeResourcePolicy.areResourcesAvailable(volumes.values(),
189191
minimumRedundantVolumes);

0 commit comments

Comments
 (0)