Hi,
Is there a way to get the JSON stats via PBC? This is how we are doing
it now, we would like to get rid of any HTTP call, currently, this is
the only call being made to HTTP:
/private void collectNodeInfo(final PBClientConfig clientConfig)//
// {//
// ...//
// RiakClusterStats stats=null;//
// try{//
// stats=new RiakClusterStats();//
// HttpClient client=new DefaultHttpClient();//
////*HttpGet g=new HttpGet("http://" + clientConfig.getHost() +
":8098/stats");*//
// HttpResponse resonse=client.execute(g);//
// JSONObject statsMap;//
// InputStream contentStream=null;//
// try{//
// contentStream=resonse.getEntity().getContent();//
// JSONTokener tok=new JSONTokener(contentStream);//
// statsMap=new JSONObject(tok);//
// stats.addNode(clientConfig.getHost(),statsMap);//
// } finally{//
// if(contentStream != null){//
// contentStream.close();//
// }//
// }//
// } catch(Exception e){//
// log.error("Huh? Exception when ",e);//
// }//
// lastClusterStats=stats;//
// }/
Kind regards,
Guido.
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com