Parcourir la source

HDFS-14616. Add the warn log when the volume available space isn't enough. Contributed by liying.

Ayush Saxena il y a 6 ans
Parent
commit
11f750e6a7

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

@@ -96,6 +96,10 @@ public class RoundRobinVolumeChoosingPolicy<V extends FsVolumeSpi>
         throw new DiskOutOfSpaceException("Out of space: "
             + "The volume with the most available space (=" + maxAvailable
             + " B) is less than the block size (=" + blockSize + " B).");
+      } else {
+        LOG.warn("The volume[{}] with the available space (={} B) is "
+            + "less than the block size (={} B).", volume.getBaseURI(),
+            availableVolumeSize, blockSize);
       }
     }
   }