diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index d64502b6dd..9c77299e50 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -3628,7 +3628,10 @@ public String getBPServiceActorInfo() { */ @Override // DataNodeMXBean public String getVolumeInfo() { - Preconditions.checkNotNull(data, "Storage not yet initialized"); + if (data == null) { + LOG.debug("Storage not yet initialized."); + return ""; + } return JSON.toString(data.getVolumeInfoMap()); }