Efficient way to fetch all records from a bucket

classic Classic list List threaded Threaded
6 messages Options
Sat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Efficient way to fetch all records from a bucket

Sat
Hi ,
I am planning to use riak-client 2.2.0 with java technology.
What I understood is, If I have to fetch all records which are falling under one bucket, I need to first fetch all keys then based on those keys I need to fetch these values. This is going to be in two steps. And first step seems to be very costly operation.
Just wanted to know is there any efficient way by which I can fetch all record from the bucket in a single call ?

Help would be appreciated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Efficient way to fetch all records from a bucket

Russell Brown-4
IF you use leveldb, there is a function in the riak-erlang-client that gets all objects in a bucket, I don’t know if it has been implemented in the java client as it was written specifically for riak-cs.

https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1130

Cheers

Russell

On 24 Jan 2017, at 07:54, Sat <[hidden email]> wrote:

> Hi ,
> I am planning to use riak-client 2.2.0 with java technology.
> What I understood is, If I have to fetch all records which are falling under
> one bucket, I need to first fetch all keys then based on those keys I need
> to fetch these values. This is going to be in two steps. And first step
> seems to be very costly operation.
> Just wanted to know is there any efficient way by which I can fetch all
> record from the bucket in a single call ?
>
> Help would be appreciated.
>
>
>
> --
> View this message in context: http://riak-users.197444.n3.nabble.com/Efficient-way-to-fetch-all-records-from-a-bucket-tp4034810.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: Efficient way to fetch all records from a bucket

Russell Brown
In reply to this post by Sat
IF you use leveldb, there is a function in the riak-erlang-client that gets all objects in a bucket, I don’t know if it has been implemented in the java client as it was written specifically for riak-cs.

https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1130

Cheers

Russell

On 24 Jan 2017, at 07:54, Sat <[hidden email]> wrote:

> Hi ,
> I am planning to use riak-client 2.2.0 with java technology.
> What I understood is, If I have to fetch all records which are falling under
> one bucket, I need to first fetch all keys then based on those keys I need
> to fetch these values. This is going to be in two steps. And first step
> seems to be very costly operation.
> Just wanted to know is there any efficient way by which I can fetch all
> record from the bucket in a single call ?
>
> Help would be appreciated.
>
>
>
> --
> View this message in context: http://riak-users.197444.n3.nabble.com/Efficient-way-to-fetch-all-records-from-a-bucket-tp4034810.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: Efficient way to fetch all records from a bucket

Grigory Fateyev
Hello!


2017-01-28 13:33 GMT+03:00 Russell Brown <[hidden email]>:
IF you use leveldb, there is a function in the riak-erlang-client that gets all objects in a bucket, I don’t know if it has been implemented in the java client as it was written specifically for riak-cs.

https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1130

Cheers

Russell

On 24 Jan 2017, at 07:54, Sat <[hidden email]> wrote:

> Hi ,
> I am planning to use riak-client 2.2.0 with java technology.
> What I understood is, If I have to fetch all records which are falling under
> one bucket, I need to first fetch all keys then based on those keys I need
> to fetch these values. This is going to be in two steps. And first step
> seems to be very costly operation.
> Just wanted to know is there any efficient way by which I can fetch all
> record from the bucket in a single call ?
>
> Help would be appreciated.
>
>
>
> --
> View this message in context: http://riak-users.197444.n3.nabble.com/Efficient-way-to-fetch-all-records-from-a-bucket-tp4034810.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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


_______________________________________________
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
|  
Report Content as Inappropriate

Re: Efficient way to fetch all records from a bucket

Russell Brown-4
I the link I provided gives you the _objects_ too. list_keys gives only keys.

On 28 Jan 2017, at 12:21, Grigory Fateyev <[hidden email]> wrote:

> Hello!
>
> I think this link https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L506 ? You need list_keys/2 function.
>
> 2017-01-28 13:33 GMT+03:00 Russell Brown <[hidden email]>:
> IF you use leveldb, there is a function in the riak-erlang-client that gets all objects in a bucket, I don’t know if it has been implemented in the java client as it was written specifically for riak-cs.
>
> https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1130
>
> Cheers
>
> Russell
>
> On 24 Jan 2017, at 07:54, Sat <[hidden email]> wrote:
>
> > Hi ,
> > I am planning to use riak-client 2.2.0 with java technology.
> > What I understood is, If I have to fetch all records which are falling under
> > one bucket, I need to first fetch all keys then based on those keys I need
> > to fetch these values. This is going to be in two steps. And first step
> > seems to be very costly operation.
> > Just wanted to know is there any efficient way by which I can fetch all
> > record from the bucket in a single call ?
> >
> > Help would be appreciated.
> >
> >
> >
> > --
> > View this message in context: http://riak-users.197444.n3.nabble.com/Efficient-way-to-fetch-all-records-from-a-bucket-tp4034810.html
> > Sent from the Riak Users mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> 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
|  
Report Content as Inappropriate

Re: Efficient way to fetch all records from a bucket

Russell Brown
In reply to this post by Grigory Fateyev
I the link I provided gives you the _objects_ too. list_keys gives only keys.

On 28 Jan 2017, at 12:21, Grigory Fateyev <[hidden email]> wrote:

> Hello!
>
> I think this link https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L506 ? You need list_keys/2 function.
>
> 2017-01-28 13:33 GMT+03:00 Russell Brown <[hidden email]>:
> IF you use leveldb, there is a function in the riak-erlang-client that gets all objects in a bucket, I don’t know if it has been implemented in the java client as it was written specifically for riak-cs.
>
> https://github.com/basho/riak-erlang-client/blob/develop/src/riakc_pb_socket.erl#L1130
>
> Cheers
>
> Russell
>
> On 24 Jan 2017, at 07:54, Sat <[hidden email]> wrote:
>
>> Hi ,
>> I am planning to use riak-client 2.2.0 with java technology.
>> What I understood is, If I have to fetch all records which are falling under
>> one bucket, I need to first fetch all keys then based on those keys I need
>> to fetch these values. This is going to be in two steps. And first step
>> seems to be very costly operation.
>> Just wanted to know is there any efficient way by which I can fetch all
>> record from the bucket in a single call ?
>>
>> Help would be appreciated.
>>
>>
>>
>> --
>> View this message in context: http://riak-users.197444.n3.nabble.com/Efficient-way-to-fetch-all-records-from-a-bucket-tp4034810.html
>> Sent from the Riak Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
Loading...