/* (non-Javadoc)
* @see com.basho.riak.client.raw.RawClient#stats()
*/
public NodeStats stats() throws IOException {
HttpResponse r = client.stats();
if (!r.isSuccess()) {
throw new IOException("stats failed with status code: "
+ r.getStatusCode());
} else {
try {
return new ObjectMapper().readValue(r.getBodyAsString(), NodeStats.class);
} catch (IOException e) {
throw new IOException("Could not parse stats JSON response, body: " + r.getBodyAsString(),e);
}
}
}