Have you had any success with reading the server response? Thanks, Jacques
On Sat, Jun 4, 2011 at 1:19 PM, Russell Brown <[email protected]> wrote: > > On 4 Jun 2011, at 18:22, Jacques wrote: > > I like the sound of option 3 also. I'll have a look at it this weekend and >> get back to you. >> > > Awesome! Thanks. If you can give me a point in the right direction > regarding the correct typing approach and what not, I'm up for giving it a > shot as well. > > > Ok, I have a half working hack. It isn't pretty 'cos the Jinterface API is > verbose. I've hacked the pbc.MapReduceBuilder to encode the job as > "application/x-erlang-binary" and submit that, but really this code should > be in a separate class, maybe using the output from > MapReduceBuilder.getJSON() as input. That way you can get the feature > without patching the client. > > What I haven't done is decode the response from Riak yet. If you want a > pointer here is a gist of the (unclean) hack. It could use a lot of work, > but it proves the concept: > > https://gist.github.com/1008293 > > The gist is just the diff so you can apply it as a patch > to src/main/java/com/basho/riak/pbc/mapreduce/MapReduceBuilder.java if you > want to play with it. > > You'll have to add Jinterface to your pom too. > > <!-- jinterface --> > <dependency> > <groupId>org.erlang.otp</groupId> > <artifactId>jinterface</artifactId> > <version>1.5.4</version> > </dependency> > > I think it is best to put the result decoding outside the library too. I'm > going to hack up a poc for that now, but I thought I'd post what I have thus > far. > > Cheers > > Russell > > > Thanks again, > Jacques > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
