0

I have a riak system, i try change replicate value, but not commplete. I use command line to change:

curl -v -XPUT \
  -H "Content-Type: application/json" \
  -d '{"props":{"n_val":2}}' \
  http://<my-ip-riak>:8098/buckets/<my-bucket>/props

then, I put file into riak by s3cmd:

s3cmd put <my-file> s3://<my-bucket>

and i check size of riak:

du -sh /var/lib/riak/

I see, it replicate 3, it not change replicate value. Any help?

Cheers,

Nghiep

1 Answers1

0

If you are using s3cmd, you are using Riak CS, not Riak. When you create a bucket using s3cmd, Riak CS creates 2 buckets: one to store manifests records and one to store data blocks. Both bucket names are based on an md5 hash of the bucket name, using the riak_cs_utils:to_bucket_name/2 function. Since the bucket name is binary, even if you correctly predict the name, you will not be able to send it in a URL to be able to change its properties.

You might be able to change the properties for a single bucket from an attach console or via protocol buffers, but I have never attempted this.

You should be able to change the default bucket properties in your app.config or riak.conf file so that all buckets use n_val=2.

Joe
  • 25,000
  • 3
  • 22
  • 44