riak

dealing with riak datatypes in postcommit hooks

核能气质少年 提交于 2019-12-14 03:53:19
问题 I am wanting to implement a postcommit hook for riak that decrements a counter in a map in another bucket. However I am having a bit of trouble dealing with the riak datatypes. Here is me attempting from riak console : (riak@127.0.0.1)9>{ok, C} = riak:local_client(). {ok,{riak_client,['riak@127.0.0.1',undefined]}} (riak@127.0.0.1)10>{ok, Obj} = C:get({<<"product">>, <<"default">>}, <<"1">>). {ok,{r_object,{<<"product">>,<<"default">>}, <<"1">>, [{r_content,{dict,5,16,16,8,80,48, {[],[],[],[],

Riak container does not start when its data volume is mounted

拈花ヽ惹草 提交于 2019-12-13 20:27:07
问题 The following command works perfectly and the riak service starts as expected: docker run --name=riak -d -p 8087:8087 -p 8098:8098 -v $(pwd)/schemas:/etc/riak/schema basho/riak-ts The local schemas directory is mounted successfully and the sql file in it is read by riak. However if I try to mount the riak's data or log directories, the riak service does not start and timeouts after 15 seconds: docker run --name=riak -d -p 8087:8087 -p 8098:8098 -v $(pwd)/logs:/var/log/riak -v $(pwd)/schemas:

riak node is not running

时间秒杀一切 提交于 2019-12-13 04:33:56
问题 I installed riak version riak-1.4.6. I ran make rel then make devrel. rel/gen_dev dev1 rel/vars/dev_vars.config.src rel/vars/dev1_vars.config Generating dev1 - node='dev1@127.0.0.1' pbc=10017 http=10018 handoff=10019 (cd rel && ../rebar generate target_dir=../dev/dev1 overlay_vars=vars/dev1_vars.config) ==> rel (generate) mkdir -p dev rel/gen_dev dev2 rel/vars/dev_vars.config.src rel/vars/dev2_vars.config Generating dev2 - node='dev2@127.0.0.1' pbc=10027 http=10028 handoff=10029 (cd rel && ..

Riak: are my 2is broken?

ぐ巨炮叔叔 提交于 2019-12-13 03:38:37
问题 we're having some weird things happening with a cleanup cronjob and riak: the objects we store (postboxes) have a 2i for modification date (which is a unix timestamp). there's a cronjob running freqently deleting all postboxes that have not been modified within 180 days. however we've found evidence that postboxes that some (very little) postboxes that were modified in the last three days were deleted by this cronjob. After reviewing and debugging several times over every line of code, I am

PHP Riak List Buckets

风格不统一 提交于 2019-12-13 02:57:51
问题 I am trying to use the Riak client for PHP and I cant find a way to get a list of all the buckets in the cluster. The docs on the Riak site say that it has support for it but i cant find any function that will do it. 回答1: Here's how you list the buckets with the Riak PHP client: <?php require_once('riak-php-client/riak.php'); $client = new RiakClient('127.0.0.1', 8091); $all_buckets = $client->buckets(); var_dump($all_buckets); // etc ?> 回答2: The documentation does not provide all of the

Does anyone know how I can store large binary values in Riak?

时光总嘲笑我的痴心妄想 提交于 2019-12-13 02:49:44
问题 Does anyone know how I can store large binary values in Riak? 回答1: For now, they don't recommend storing files larger than 50MB in size without splitting them. See: FAQ - Riak Wiki If your files are smaller than 50MB, than proceed as you would with storing non binary data in Riak. Another reason one might pick Riak is for flexibility in modeling your data. Riak will store any data you tell it to in a content-agnostic way — it does not enforce tables, columns, or referential integrity. This

Node 'riak@192.168.1.218' not responding to pings

▼魔方 西西 提交于 2019-12-13 02:13:21
问题 I have no idea what happend with the system, but suddenly when I issue riak start it doesn't start anymore. I get this output. And if I issue riak console, I get no response for pings. I don't know what to do, so please advise how to put the system back online. root@aliceubuntu:/home/alice# riak start !!!! !!!! WARNING: ulimit -n is 1024; 4096 is the recommended minimum. !!!! riak failed to start within 15 seconds, see the output of 'riak console' for more information. If you want to wait

Is it possible to force Riak 2.0 to re-index data after changing a schema, without reloading the data?

江枫思渺然 提交于 2019-12-12 23:16:00
问题 I have a Riak Search index of about 5 million docs that I would like to experiment with making changes to the schema. Is it possible to have Riak re-index that data without having to insert those documents again? Does this happen automatically when the schema is changed? I could not find information about this in the docs. Thanks for any help with this! 回答1: Right now the only way to re-index the objects is to iterate over each of the keys and update the object to trigger an update to the

Ripple with Devise

假如想象 提交于 2019-12-12 13:31:28
问题 Iam Trying to create authentications using devise with riak as the database. I found a ORM strategy for the same https://github.com/frank06/devise-ripple, it does work all fine except for the part that when i try to register with a email which is already present in the db it does not provide a error message instead it overwrites the present data and updates it. The problem I figured is that ripple deals with .save() differently than active record, ie when active record would throw and error

Riak database fails after a short period

坚强是说给别人听的谎言 提交于 2019-12-12 09:58:22
问题 I crerated a simple erlang application which periodically collects required data and puts it in a riak database. As I start my application it runs smoothly.. but after a period of time it stucks as PUT requests to riak database becomes too slow.. It is logs from my app: 2013-06-26 12:44:09.090 [info] <0.60.0> data processed in [16476 ms] 2013-06-26 12:45:51.472 [info] <0.60.0> data processed in [18793 ms] ... 2013-06-26 12:57:28.138 [info] <0.60.0> data processed in [15135 ms] 2013-06-26 13