final String read_bytes_total = qualifiedIOMetricName("read_bytes", true);
final String written_bytes = qualifiedIOMetricName("written_bytes", false);
final String written_bytes_total = qualifiedIOMetricName("written_bytes", true);
request.metrics = new String[] { read_bytes, read_bytes_total, written_bytes, written_bytes_total };
try {
final MetricsListResponse response = api.path(routes.MetricsResource().multipleMetrics(), MetricsListResponse.class)
.clusterEntity(node)
.body(request)
.expect(200, 404)
.execute();
final Map<String,Metric> metrics = response.getMetrics();
final IoStats ioStats = new IoStats();
// these are all Gauges, if this ever changes almost everything is broken...
ioStats.readBytes = asLong(read_bytes, metrics);
ioStats.readBytesTotal = asLong(read_bytes_total, metrics);
ioStats.writtenBytes = asLong(written_bytes, metrics);