Alright, so I've worked my way through a few hurdles in getting this thing to
work properly but I've hit a spot where I don't know what to try next. keep in
mind that I am learning both Erlang and Riak at the same time, or at least
trying to.
Connecting works just fine:
{ok, Pid} = riak:client_connect('[email protected]').
{ok,{riak_client,'[email protected]',<<2,232,152,157>>}}
Trying to create a new riak object does not go as smoothly:
Object = riakc_obj:new(<<"groceries">>, <<"mine">>, <<"eggs & bacon">>).
** exception error: undefined function riakc_obj:new/3
The module can be found, however, so I know I set up the code paths right:
code:which(riakc_obj).
"/usr/lib/riak/lib/riakc-1/ebin/riakc_obj.beam"
The function new/4 works just fine though:
Object = riakc_obj:new(<<"groceries">>, <<"mine">>, <<"eggs & bacon">>, []).
{riakc_obj,<<"groceries">>,<<"mine">>,<<"eggs & bacon">>,[],
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],...}}},
undefined}
I've tried two different ways to put that object into the DB and both failed as
shown below:
Pid:put(Object, 1).
** exception error: no function clause matching
riak_object:increment_vclock({riakc_obj,<<"groceries">>,<<"mine">>,
<<"eggs & bacon">>,[],
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],
[],[],...},
{{[],[],[],[],[],[],[],[],[],[],[],
[],...}}},
undefined},
<<2,232,152,157>>)
in function riak_client:put/5
AND
riak_client:put(Object, 1, 1).
** exception error: no function clause matching
riak_client:put({riakc_obj,<<"groceries">>,<<"mine">>,
<<"eggs & bacon">>,[],
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],...},
{{[],[],[],[],[],[],[],[],[],[],[],[],...}}},
undefined},
1,1)
The above method also fails if I try the put/4 method with the same error
message .
I'm looking in the source code here: http://hg.basho.com/riak/downloads and
based on what I can see I can't explain why I am getting the errors I am, with
put or with creating a new object. I might just be too tired at the moment to
figure it out but it is driving me crazy and any help would be appreciated.
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com