diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java index d1f8f0581e..6d00d75b53 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java @@ -2606,6 +2606,7 @@ class FsDatasetImpl implements FsDatasetSpi { final long reservedSpaceForReplicas; // size of space reserved RBW or // re-replication final long numBlocks; + final StorageType storageType; VolumeInfo(FsVolumeImpl v, long usedSpace, long freeSpace) { this.directory = v.toString(); @@ -2614,6 +2615,7 @@ class FsDatasetImpl implements FsDatasetSpi { this.reservedSpace = v.getReserved(); this.reservedSpaceForReplicas = v.getReservedForReplicas(); this.numBlocks = v.getNumBlocks(); + this.storageType = v.getStorageType(); } } @@ -2649,6 +2651,7 @@ class FsDatasetImpl implements FsDatasetSpi { innerInfo.put("reservedSpace", v.reservedSpace); innerInfo.put("reservedSpaceForReplicas", v.reservedSpaceForReplicas); innerInfo.put("numBlocks", v.numBlocks); + innerInfo.put("storageType", v.storageType); info.put(v.directory, innerInfo); } return info; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode/datanode.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode/datanode.html index b35a0a71ee..e474ab5f16 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode/datanode.html +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode/datanode.html @@ -100,6 +100,7 @@ Directory + StorageType Capacity Used Capacity Left Capacity Reserved @@ -110,6 +111,7 @@ {#dn.VolumeInfo} {name} + {storageType} {usedSpace|fmt_bytes} {freeSpace|fmt_bytes} {reservedSpace|fmt_bytes}