Skip to content

Instantly share code, notes, and snippets.

View bsparrow435's full-sized avatar

Brian Sparrow bsparrow435

View GitHub Profile
@bsparrow435
bsparrow435 / gist:3493647
Created August 28, 2012 00:11
Clone a cluster

#How To: Clone A Cluster

##Summary This gist will walk through the procedure of altering a secondary cluster using the ring configuration of a primary cluster. This configuration allows partitions to be transferred between clusters using any file transfer utility.

##Restrictions

  1. Supported Riak Versions: 1.2

  2. Both clusters must have same ring size and node count.

@bsparrow435
bsparrow435 / gist:3486140
Created August 27, 2012 06:15
Delete keys map reduce

#Map Reduce Delete Instructions

Set allow_strfun true on all nodes:

echo "rpc:multicall([node() | nodes()], application,set_env,[riak_kv,allow_strfun,true])." | bin/riak attach

Insert 15000 keys:

for i in {1..15000}; do curl -XPUT http://127.0.0.1:9000/buckets/test/keys/test$i -H "content-type: text/plain" -d "Data #$i\n"; done