HDFS-11375. Display the volume storage type in datanode UI. Contributed by Surendra Singh Lilhore
This commit is contained in:
parent
627da6f717
commit
0741dd3b9a
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue