MetricsCollector collector = getCollector(CLUSTER_METRICS_CONTEXT);
// TODO: metrics should support longs
LOG.trace("total cluster storage = " + storageCapacity + " total used = " + totalUsed);
collector.increment("resources.total.storage", (int) (storageCapacity / 1024 / 1024));
collector.increment("resources.available.storage", (int) (storageAvailable / 1024 / 1024));
collector.increment("resources.used.storage", (int) (totalUsed / 1024 / 1024));
collector.increment("resources.used.files", (int) totalFiles);
collector.increment("resources.used.directories", (int) totalDirectories);
} catch (IOException e) {
LOG.warn("Exception getting hdfs metrics", e);