Slow performance on getting via 2i

Russell Brown russell.brown at
Mon Mar 19 07:00:29 EDT 2012

On 19 Mar 2012, at 10:34, ivenhov wrote:

> Hi Russell
> Thanks for reply.
> I tried to use your example but I could not find class BinIndexQuery in riak
> client (I'm using 1.0.4, is there any newer version?)
No, you are correct, I replied from memory rather than checking the API first, sorry.

> I gave it a try with:
> IndexQuery indexQuery = new BinValueQuery(BinIndex.named(BUCKET_NAME),
> BUCKET_NAME, bucketFilter.toString());
> MapReduceResult res = _iclient.mapReduce(indexQuery).execute();           
> Collection<String> resS = res.getResult(String.class);
> which is probably something completely different since I got:
> com.basho.riak.client.query.NoPhasesException
> 	at com.basho.riak.client.query.MapReduce.validate(
> 	at com.basho.riak.client.query.MapReduce.execute(

Hmmm. I believe that validation should have been removed since Riak 1.1 MapReduce can be executed without phases. I've raised an issue for that[1]. Until it is fixed you can't try the example I suggested.

Well you can. Just use the raw client and provide a JSON string to it

    String jsonString = "{\"inputs\":{\"bucket\":\"mybucket\", \"index\":\"myindex_bin\", \"key\":\"mykey\"}, \"query\": []}";
    rawClient.mapReduce(new MapReduceSpec(jsonString));

If that is much faster then the reduce phases are to blame. Try adding back one, then the other. I have a suspicion that the JS reduce is the problem.




> I checked the github repository but could not find anything about
> BinIndexQuery.
> Daniel.
> --
> View this message in context:
> Sent from the Riak Users mailing list archive at
> _______________________________________________
> riak-users mailing list
> riak-users at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list