use of alluxio.wire.Capacity in project alluxio by Alluxio.
the class AlluxioWorkerRestServiceHandler method getTierCapacityInternal.
private Map<String, Capacity> getTierCapacityInternal() {
SortedMap<String, Capacity> tierCapacity = new TreeMap<>(getTierAliasComparator());
Map<String, Long> capacityBytesOnTiers = mStoreMeta.getCapacityBytesOnTiers();
Map<String, Long> usedBytesOnTiers = mStoreMeta.getUsedBytesOnTiers();
for (Map.Entry<String, Long> entry : capacityBytesOnTiers.entrySet()) {
tierCapacity.put(entry.getKey(), new Capacity().setTotal(entry.getValue()).setUsed(usedBytesOnTiers.get(entry.getKey())));
}
return tierCapacity;
}