Java 类org.apache.hadoop.hdfs.server.datanode.FSDataset.VolumeInfo 实例源码

项目:hadoop-on-lustre    文件:DataNode.java   
/**
 * Returned information is a JSON representation of a map with 
 * volume name as the key and value is a map of volume attribute 
 * keys to its values
 */
@Override // DataNodeMXBean
public String getVolumeInfo() {
  final Map<String, Object> info = new HashMap<String, Object>();
  Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo();
  for (VolumeInfo v : volumes) {
    final Map<String, Object> innerInfo = new HashMap<String, Object>();
    innerInfo.put("usedSpace", v.usedSpace);
    innerInfo.put("freeSpace", v.freeSpace);
    innerInfo.put("reservedSpace", v.reservedSpace);
    info.put(v.directory, innerInfo);
  }
  return JSON.toString(info);
}
项目:cumulus    文件:DataNode.java   
/**
 * Returned information is a JSON representation of a map with 
 * volume name as the key and value is a map of volume attribute 
 * keys to its values
 */
@Override // DataNodeMXBean
public String getVolumeInfo() {
  final Map<String, Object> info = new HashMap<String, Object>();
  Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo();
  for (VolumeInfo v : volumes) {
    final Map<String, Object> innerInfo = new HashMap<String, Object>();
    innerInfo.put("usedSpace", v.usedSpace);
    innerInfo.put("freeSpace", v.freeSpace);
    innerInfo.put("reservedSpace", v.reservedSpace);
    info.put(v.directory, innerInfo);
  }
  return JSON.toString(info);
}
项目:hortonworks-extension    文件:DataNode.java   
/**
 * Returned information is a JSON representation of a map with 
 * volume name as the key and value is a map of volume attribute 
 * keys to its values
 */
@Override // DataNodeMXBean
public String getVolumeInfo() {
  final Map<String, Object> info = new HashMap<String, Object>();
  Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo();
  for (VolumeInfo v : volumes) {
    final Map<String, Object> innerInfo = new HashMap<String, Object>();
    innerInfo.put("usedSpace", v.usedSpace);
    innerInfo.put("freeSpace", v.freeSpace);
    innerInfo.put("reservedSpace", v.reservedSpace);
    info.put(v.directory, innerInfo);
  }
  return JSON.toString(info);
}
项目:hortonworks-extension    文件:DataNode.java   
/**
 * Returned information is a JSON representation of a map with 
 * volume name as the key and value is a map of volume attribute 
 * keys to its values
 */
@Override // DataNodeMXBean
public String getVolumeInfo() {
  final Map<String, Object> info = new HashMap<String, Object>();
  Collection<VolumeInfo> volumes = ((FSDataset)this.data).getVolumeInfo();
  for (VolumeInfo v : volumes) {
    final Map<String, Object> innerInfo = new HashMap<String, Object>();
    innerInfo.put("usedSpace", v.usedSpace);
    innerInfo.put("freeSpace", v.freeSpace);
    innerInfo.put("reservedSpace", v.reservedSpace);
    info.put(v.directory, innerInfo);
  }
  return JSON.toString(info);
}