Erlang PBC won't generate key

Gabriel Pickard gpickard at uos.de
Fri Jul 22 11:36:47 EDT 2011


Hello,

I would like to let Riak generate a key for a posted item, using the Erlang
PBC. I tried to do it according to the client library readme, by replacing
the key by the atom undefined as second argument to  riakc_obj:new. Results
as shown at bottom of email.
It works using the PBC if I specify a key, I can also have Riak generate a
key using the HTTP interface, it's only generating a key from PBC that
doesn't seem to work for me.
Anyone can reproduce this?

Another thing that I noticed: There's a slight inconsistency in the
documentation that tripped me up a few times;
http://wiki.basho.com/Basic-Riak-API-Operations.html uses port 8091 for all
its examples, whereas  http://wiki.basho.com/Installation-and-Setup.html as
well as my version use port 8098 for HTTP communication.
Also, being a newbie, I confused the protobuf and HTTP port a few times,
really not sure but maybe a small reminder in the PBC readme would help with
that.

Thank you guys at Basho for Riak, it's a joy to work with.

Cheers, Gabe


1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).
{ok,<0.35.0>}
2> Object = riakc_obj:new(<<"groceries">>, undefined, <<"eggs & bacon">>).
{riakc_obj,<<"groceries">>,undefined,undefined,[],undefined,
           <<"eggs & bacon">>}
3> riakc_pb_socket:put(Pid, Object).

=ERROR REPORT==== 22-Jul-2011::17:16:38 ===
** Generic server <0.35.0> terminating
** Last message in was {tcp_closed,#Port<0.899>}
** When Server state == {state,"127.0.0.1",8087,false,false,undefined,
                               undefined,
                               {[],[]},
                               1,[],infinity,100}
** Reason for termination ==
** disconnected
** exception exit: disconnected
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110722/1470f026/attachment.html>


More information about the riak-users mailing list