> On Dec 3, 2014, at 1:04 PM, niedomnie <niedom...@gmail.com> wrote:
> 
> no results (prints 0) on below code (using 2.0 java client from maven, and
> connecting to riak 2.0),
> I've changed map/reduce functions JS or Erlang, used different MapReduce
> classes (for Bucket, BucketKey, or Index one) but without any luck.
> It is written in groovy - but I do not think that it differs from java code
> in this example
> 
> def client = RiakClient.newClient(RiakNode.Builder.DEFAULT_REMOTE_PORT,
> "127.0.0.1")
> 
> Namespace ns = new Namespace("current", "bucket");
>    for (int i = 0; i < 200; i++) {
>        Location loc = new Location(ns, "key" + i);
>        RiakObject ro = new RiakObject().setContentType("text/plain")
>                .setValue(BinaryValue.create("" + i));
>        StoreValue sv = new
> StoreValue.Builder(ro).withLocation(loc).build();
>        RiakFuture<StoreValue.Response, Location> future =
> G.client.executeAsync(sv);
>        future.await();
>    }

Before we try to debug the MapReduce job, can we make sure the values are being 
written to the database successfully?

It looks like you’re not inspecting RiakFuture when the future is completed — 
can you try inspecting the future using isSuccess() to be sure the values have 
been written successfully?

http://basho.github.io/riak-java-client/2.0.0/com/basho/riak/client/core/RiakFuture.html
 
<http://basho.github.io/riak-java-client/2.0.0/com/basho/riak/client/core/RiakFuture.html>

Thanks,
- Chris

Christopher Meiklejohn
Senior Software Engineer
Basho Technologies, Inc.
cmeiklej...@basho.com
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to