Skip to content

Commit 11f750e

Browse files
committed
HDFS-14616. Add the warn log when the volume available space isn't enough. Contributed by liying.
1 parent de64253 commit 11f750e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/RoundRobinVolumeChoosingPolicy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ private V chooseVolume(final int curVolumeIndex, final List<V> volumes,
9696
throw new DiskOutOfSpaceException("Out of space: "
9797
+ "The volume with the most available space (=" + maxAvailable
9898
+ " B) is less than the block size (=" + blockSize + " B).");
99+
} else {
100+
LOG.warn("The volume[{}] with the available space (={} B) is "
101+
+ "less than the block size (={} B).", volume.getBaseURI(),
102+
availableVolumeSize, blockSize);
99103
}
100104
}
101105
}

0 commit comments

Comments
 (0)