riak-erlang-client write, riak-java-client read problem

Marcel Müller marcel.mueller at mlvv.de
Sat Jan 7 12:16:35 EST 2012

Hi Guys, 

it looks like we have a conversation problem between both APIs. 

First i wrote with riak-erlang-client to the riak:

    {ok,Pid} = riakc_pb_socket:start_link("", 8087),
    Tuple = "{\"id\",22}",
    Obj = riakc_obj:new("mm","1",Tuple),

After then we try to read from risk-java-client:

	RiakClient httpClient = new RiakClient("");
        IRiakClient client = RiakFactory.httpClient(httpClient);
        Bucket b = client.fetchBucket("mm").execute();
        IRiakObject fetched = b.fetch("1").execute();
        String decodedString = new String(fetched.getValue());

I convert the Object to an HexString: 83 6B 00 05 7B 22 6E 22 7D

My question is: 

1. What are the first 4 bytes ? 
2. how can i receive a string with out the 4 bytes ? 
3. How can i convert the string into a JSON Object ? 

Thanks for your help 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20120107/8f404a13/attachment.html>

More information about the riak-users mailing list