sudo su ubuntu
sudo -s
apt-get install -y git
git clone https://gist.github.com/94d82c2ac08dfcad488e.git riak_relocatable
cd riak_relocatable
chmod 755 build.sh
./build.sh
| LinuxKit for Docker for Mac: | |
| ***Cloning LinuxKit Repository:*** | |
| Ajeets-MacBook-Air:~ ajeetraina$ sudo git clone https://github.com/linuxkit/linuxkit | |
| Cloning into 'linuxkit'... | |
| remote: Counting objects: 20097, done. | |
| remote: Compressing objects: 100% (14/14), done. | |
| remote: Total 20097 (delta 1), reused 0 (delta 0), pack-reused 20082 |
| [Unit] | |
| Description=Consul service discovery agent | |
| Requires=network-online.target | |
| After=network.target | |
| [Service] | |
| User=consul | |
| Group=consul | |
| PIDFile=/run/consul/consul.pid | |
| Restart=on-failure |
Just make Erlang to do some light-load task in a bunch of relatively short leaving processes. Calculating PI to 80th digit in batches per 10 procs with short, 8 ms, sleep in-between, to give schedulers a breath space, will do.
Run erl with 8 schedulers and no busy waiting on schedulers at all.
| This gist captures what needs to be done to add a new field to Riak's Yokozuna | |
| search index. | |
| Sources: | |
| - https://github.com/basho/yokozuna/issues/130 | |
| - http://riak-users.197444.n3.nabble.com/How-to-update-existed-schema-td4032143.html | |
| The code below is for illustration purposes only. Use at your own risk. | |
| 1. Create/Update new schema file |
Load 10Mb of data into /tmp/foo:
sudo dd if=/dev/disk0 of=/tmp/foo bs=1m count=10Start loading it into dev1 node
for i in `seq 1 10000`
do curl -XPUT "http://localhost:10018/buckets/food3/keys/ooopp$i" -d@/tmp/foo This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| -module(riak_metrics). | |
| -compile(export_all). | |
| main([NodeName0, Cookie, Length, Command]) -> | |
| LocalName = '[email protected]', | |
| NodeName = list_to_atom(NodeName0), | |
| case net_kernel:start([LocalName]) of | |
| {ok, _} -> | |
| erlang:set_cookie(node(), list_to_atom(Cookie)), | |
| case net_kernel:hidden_connect_node(NodeName) of |
Entry point for all object operations: https://github.com/basho/riak_kv/blob/1.4.2/src/riak_kv_wm_object.erl
delete_resource/2 takes RequestData(Request header, ex: vclock) and Context(Record containing: Bucket, Key, Client): https://github.com/basho/riak_kv/blob/1.4.2/src/riak_kv_wm_object.erl#L888