HDFS-11375. Display the volume storage type in datanode UI. Contributed by Surendra Singh Lilhore
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0741dd3b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0741dd3b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0741dd3b Branch: refs/heads/HADOOP-13345 Commit: 0741dd3b9abdeb65bb783c1a8b01f078c4bdba17 Parents: 627da6f Author: Mingliang Liu <lium...@apache.org> Authored: Wed Feb 15 11:37:26 2017 -0800 Committer: Mingliang Liu <lium...@apache.org> Committed: Wed Feb 15 11:37:26 2017 -0800 ---------------------------------------------------------------------- .../hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java | 3 +++ .../hadoop-hdfs/src/main/webapps/datanode/datanode.html | 2 ++ 2 files changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/0741dd3b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java ---------------------------------------------------------------------- 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 d1f8f05..6d00d75 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<FsVolumeImpl> { 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<FsVolumeImpl> { this.reservedSpace = v.getReserved(); this.reservedSpaceForReplicas = v.getReservedForReplicas(); this.numBlocks = v.getNumBlocks(); + this.storageType = v.getStorageType(); } } @@ -2649,6 +2651,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> { 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; http://git-wip-us.apache.org/repos/asf/hadoop/blob/0741dd3b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/datanode/datanode.html ---------------------------------------------------------------------- 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 b35a0a7..e474ab5 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 @@ <thead> <tr> <th>Directory</th> + <th>StorageType</th> <th>Capacity Used</th> <th>Capacity Left</th> <th>Capacity Reserved</th> @@ -110,6 +111,7 @@ {#dn.VolumeInfo} <tr> <td>{name}</td> + <td>{storageType}</td> <td>{usedSpace|fmt_bytes}</td> <td>{freeSpace|fmt_bytes}</td> <td>{reservedSpace|fmt_bytes}</td> --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org