use of org.apache.hadoop.hdfs.server.protocol.DatanodeStorageReport in project SSM by Intel-bigdata.
the class DatanodeStorageReportProcTask method getDNStorageReports.
/**
* Get live datanode storage reports and then build the network topology.
* @return
* @throws IOException
*/
public List<DatanodeStorageReport> getDNStorageReports() throws IOException {
final DatanodeStorageReport[] reports = client.getDatanodeStorageReport(DatanodeReportType.LIVE);
final List<DatanodeStorageReport> trimmed = new ArrayList<DatanodeStorageReport>();
// over-utilized, above-average, below-average and under-utilized.
for (DatanodeStorageReport r : DFSUtil.shuffle(reports)) {
final DatanodeInfo datanode = r.getDatanodeInfo();
trimmed.add(r);
}
return trimmed;
}
Aggregations