NodeStats stats = entry.getValue();
nodeAttributes.put("Address", stats.getNode().getAddress().toString());
nodeAttributes.put("Type", stats.getNode().isMasterNode() ? "Master" : "Slave");
- nodeAttributes.put("Disk Usage", byteCountToDisplaySize(stats.getFs().getTotal().getTotal().bytes()));
nodeAttributes.put("Disk Available", byteCountToDisplaySize(stats.getFs().getTotal().getAvailable().bytes()));
nodeAttributes.put("Store Size", byteCountToDisplaySize(stats.getIndices().getStore().getSizeInBytes()));
nodeAttributes.put("Open Files", stats.getProcess().getOpenFileDescriptors());
assertThat(nodesAttributes).hasSize(1);
Map nodeAttributes = (Map)nodesAttributes.values().iterator().next();
assertThat(nodeAttributes.get("Type")).isEqualTo("Master");
- assertThat(nodeAttributes.get("Disk Usage")).isNotNull();
assertThat(nodeAttributes.get("Store Size")).isNotNull();
}