Dmitry,

the Protocol Buffer interface doesn't yet support setting most of the available 
bucket properties. Support for doing that was added just recently though.

For now the easiest workaround is to just use the REST API, for which you'll 
need the binaries. Both binaries and atoms work, but for the REST API it's best 
to use binaries as it doesn't handle atoms.

Mathias Meyer
Developer Advocate, Basho Technologies

On Dienstag, 17. Mai 2011 at 08:58, Dmitry Demeshchuk wrote: 
> Greetings.
> 
> I'm looking for a way to set expiry_secs for specific buckets. For
> example, if some buckets need to have object expiration time and some
> buckets need to have unlimited lifetime.
> 
> I've tried to do this using multi_backend:
> 
> {storage_backend, riak_kv_multi_backend},
> {multi_backend_default, <<"default">>},
> {multi_backend, [
>  {<<"default">>, riak_kv_bitcask_backend, []},
>  {<<"cache">>, riak_kv_bitcask_backend, [
>  {expiry_secs, 60},
>  ]}
> ]},
> 
> But when I call
> 
> riakc_pb_socket:set_bucket(<<"test">>, [{backend, <<"cache">>}]),
> 
> this setting isn't applied to the bucket. Tried to set different data
> directories for both backends – with the same result.
> 
> Is such thing possible at all, and if it's possible, what am I doing wrong?
> 
> Also, looks like riak_kv_multi_backend.erl has documentation a bit
> different with wiki. At wiki backends aliases are binaries, and at the
> module's docs they are atoms. Probably, both of them work, but neither
> of them worked for me :(
> 
> -- 
> Best regards,
> Dmitry Demeshchuk
> 
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 


_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to