Link walking

Georgi Ivanov ivanov at vesseltracker.com
Thu Oct 31 10:22:28 EDT 2013


Hello,
I am trying to make Link walking work .

I am using this as example :

http://basho.com/link-walking-by-example/

So basically adding keys works as expected, but i am unable to query .

Example:

add first :

curl -X PUT -H "content-type:text/plain" \
  -H "Link: </riak/hb/second>; riaktag=\"foo\", </riak/hb/third>; 
riaktag=\"foo\"" \
  http://localhost:8098/riak/hb/first --data "hello"

Add second:

curl -X PUT -H "content-type: text/plain" \
  -H "Link:</riak/hb/fourth>; riaktag=\"foo\"" \
  http://localhost:8098/riak/hb/second --data "the second"

Try to query :

curl http://localhost:8098/riak/hb/first/_,_,_

Response :
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>Not Found</H1>The 
requested document was not found on this 
server.<P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></BODY></HTML>

If i try with really  invalid query  i get this :

curl http://localhost:8098/riak/hb/first/_,_,

Invalid link walk query submitted. Valid link walk query format is: 
/riak/some_bucket/some_key/<bucket>,<riaktag>,0|1

What i am missing here ? Some miss-configuration ? 

What i changed in app.config was :

{default_bucket_props, [
    {n_val,1},
    {allow_mult,false},
    {last_write_wins,false},
    {precommit, []},
    {postcommit, []},
    {chash_keyfun, {riak_core_util, chash_std_keyfun}},
    {linkfun, {modfun, riak_kv_wm_link_walker, mapreduce_linkfun}}
    ]}

but this are the defaults except n_val imo.




More information about the riak-users mailing list