- timeout(sec) : 5
- message count: 2
(riak1@127.0.0.1)14> redbug:start(5000, 2, {riak_kv_keys_fsm,'_'}).
ok
16:23:32 <{riak_core_coverage_fsm,init,1}> {riak_kv_keys_fsm,init,
| %% Get the state for the local node | |
| %% The get_my_ring function really returns the ring | |
| %% plus other state information about the cluster. | |
| {ok, State} = riak_core_ring_manager:get_my_ring(). | |
| %% Get number of partitions | |
| riak_core_ring:num_partitions(State). | |
| %% Get the names of custom buckets | |
| riak_core_ring:get_buckets(State). |
| %% Get the state for the local node | |
| %% The get_my_ring function really returns the ring | |
| %% plus other state information about the cluster. | |
| {ok, State} = riak_core_ring_manager:get_my_ring(). | |
| %% Get number of partitions | |
| riak_core_ring:num_partitions(State). | |
| %% Get the names of custom buckets | |
| riak_core_ring:get_buckets(State). |
riak_object and populate the various fields with the headers, metadata supplied by the client.riak_client:put: https://github.com/basho/riak_kv/blob/1.4.2/src/riak_client.erl#L143handle_common_errors and it is nice to return human readable errors to client :)| echo "Data load start time: $(date +%s)" | |
| for i in {1..100} | |
| do | |
| curl -XPOST http://localhost:10018/riak/some_bucket -d "$RANDOM" -H "X-Riak-Index-Timestamp_int: $(date +%s)" -H "Content-Type: text/plain" | |
| sleep 0.5 | |
| done | |
| echo "Data load end time: $(date +%s)" | |
| echo "Running MapReduce" | |
| curl -XPOST http://localhost:10018/mapred -H "Content-Type: application/json" -d ' |
| import scala.concurrent.duration._ | |
| import scala.concurrent.ExecutionContext | |
| import scala.concurrent.Future | |
| import akka.pattern.after | |
| import akka.actor.Scheduler | |
| /** | |
| * Given an operation that produces a T, returns a Future containing the result of T, unless an exception is thrown, | |
| * in which case the operation will be retried after _delay_ time, if there are more possible retries, which is configured through | |
| * the _retries_ parameter. If the operation does not succeed and there is no retries left, the resulting Future will contain the last failure. |
| #!/usr/bin/env python | |
| import httplib | |
| import json | |
| from datetime import datetime, date, time | |
| from time import sleep | |
| import os.path | |
| from multiprocessing import Process | |