Issue with Link Queries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with Link Queries

Lincoln Stoll
I'm having some problems with link queries - either getting no
results, or sometimes a 500 error

Are there any known issues with them? I'm using 0.8 on Mac OS 10.6

Details of what I'm trying to do are here:
https://gist.github.com/894dc3ef3eb8b9c44a2d
https://gist.github.com/894dc3ef3eb8b9c44a2d

Cheers,
        Linc.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Issue with Link Queries

Sean Cribbs
Lincoln,

While running your example, I've discovered a few bugs related to this
that I'll be documenting.

1) returnbody=true when PUT/POSTing an object doesn't return the correct
content-type (text/plain).
2) A "follow anything" link query doesn't work. Specifying a bucket or
tag will return results, however.

For making your Ruby code simpler, here's a few tips.

1) You can convert an object directly into a link with a tag:
new_one.to_link("parent") would work for your example.
http://seancribbs.github.com/ripple/Riak/RObject.html#to_link-instance_method
2) Instead of crafting a map/reduce job for link-walking, just do
new_to.walk, which takes any number of WalkSpecs (or parameters that can
be converted into walkspecs):
http://seancribbs.github.com/ripple/Riak/RObject.html#walk-instance_method

Cheers,

Sean

On 2/17/10 12:19 PM, Lincoln Stoll wrote:

> I'm having some problems with link queries - either getting no
> results, or sometimes a 500 error
>
> Are there any known issues with them? I'm using 0.8 on Mac OS 10.6
>
> Details of what I'm trying to do are here:
> https://gist.github.com/894dc3ef3eb8b9c44a2d
> https://gist.github.com/894dc3ef3eb8b9c44a2d
>
> Cheers,
>          Linc.
>
> _______________________________________________
> riak-users mailing list
> [hidden email]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>    


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Issue with Link Queries

Lincoln Stoll
Awesome, thanks for that - it's much simpler. I figured there had to
be something like that in there, but missed it - nice work on ripple
btw.

Just to clarify because the riak docs don't mention it, It is not
possible to submit link-only jobs to the mapred interface - they have
to have some kind of map (or reduce function?). I've seen this come up
elsewhere, so just want to confirm and get it out there.

Linc.


On Wed, Feb 17, 2010 at 18:52, Sean Cribbs <[hidden email]> wrote:
> 1) You can convert an object directly into a link with a tag:
> new_one.to_link("parent") would work for your example.
> http://seancribbs.github.com/ripple/Riak/RObject.html#to_link-instance_method
> 2) Instead of crafting a map/reduce job for link-walking, just do
> new_to.walk, which takes any number of WalkSpecs (or parameters that can be
> converted into walkspecs):
> http://seancribbs.github.com/ripple/Riak/RObject.html#walk-instance_method

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Issue with Link Queries

bryan-basho
Administrator
On Fri, Feb 19, 2010 at 4:55 AM, Lincoln Stoll <[hidden email]> wrote:
> Just to clarify because the riak docs don't mention it, It is not
> possible to submit link-only jobs to the mapred interface - they have
> to have some kind of map (or reduce function?). I've seen this come up
> elsewhere, so just want to confirm and get it out there.

Hi, Lincoln.  Thanks for bringing this up.  It also prevented putting
a Javascript 'reduce' phase directly after a link phase.  It was due
to a non-JSON-encodable format being used for passing links out of the
link phase.  I've pushed a fix for it to the tip of the bitbucket
repository.

http://bitbucket.org/basho/riak/changeset/84f2928fbb52/

-Bryan

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com