riak

Using the Erlang client library from Riak in Nitrogen

左心房为你撑大大i 提交于 2019-12-12 06:37:59
问题 This question is a continuation of Including the Erlang client lib which was asked before. I was able to include the library by changing: {mimetypes, ".*", {git, "git://github.com/spawngrid/mimetypes", {branch, master}}}, %% Uncomment the following lines and comment the bottom lines with specific %% tags to always pull the latest versions {nitrogen_core, ".*", {git, "git://github.com/nitrogen/nitrogen_core",{branch, master}}}, to: {mimetypes, ".*", {git, "git://github.com/spawngrid/mimetypes"

Does ejabberd support DB Level clustering on NOSQL RIak?

对着背影说爱祢 提交于 2019-12-12 04:59:20
问题 I am working on chat app. I have two ejabberd nodes node1@domain.com and node2@domain.com if i will do master-master clustering between nodes and each nodes have their own riak server if node1 riak server goes down then how node1 transfer request to node2? Please suggest me solution. 回答1: This is not how it is supposed to work. If you deploy with Riak, you are supposed to have a dedicated Riak infrastructure. Moreover, having only two Riak nodes does not make sense: You need at least 5 Riak

Riak Force remove node from Riak KV cluster

左心房为你撑大大i 提交于 2019-12-12 04:06:45
问题 I have having 5 node cluster of Riak Kv, having ring size as given below riak@172.XX.XX.10 19.9 riak@172.XX.XX.11 19.9 riak@172.XX.XX.12 19.9 riak@172.XX.XX.13 20.0 riak@172.XX.XX.14 20.3 but after removing node riak@172.XX.XX.12 from cluster forcely by command sudo riak-admin force-remove -f riak@172.XX.XX.12 ring size becomes as given below riak@172.XX.XX.10 25.0 riak@172.XX.XX.11 25.0 riak@172.XX.XX.13 25.0 riak@172.XX.XX.14 25.0 but I lossed some data , is there any procedure to recover

riak_core node rebalance pending

老子叫甜甜 提交于 2019-12-12 01:49:48
问题 I have a riak_core ring with 3 physical nodes. When I joined first two nodes in the cluster( by riak_admin cluster plan; risk_admin cluster commit) the risk_admin member-status showed that cluster is in valid state but all the nodes (100%) were still sitting on the first node and both nodes showing pending 50%. I was expecting the cluster to rebalance relatively quickly but nothing was happening until I restarted one of the nodes. When the node came up, member-status showed that 25% of the

URL-unsafe Secondary Index names in Riak do not work

人走茶凉 提交于 2019-12-11 06:16:44
问题 I am using Riak 1.3.1 and am trying to create a binary index name Indexed field name @$@$@ @$ not url safe#@£! . I am able to successfully save a key with this index. When I query for this key directly using the key value, I get this as a result: {"indexedFieldValue":"index @$ value","keyValue":"093741d5-940a-49a6-b742-be22c1773e87","indexes":{"Indexed field name @$@$@ @$ not url safe#@£!":"index @$ value"}} Now, when I try to query using this index by using the URL /index/Indexed+field+name+

Riak Map Reduce in JS returning limited data

给你一囗甜甜゛ 提交于 2019-12-11 04:07:52
问题 So I have Riak running on 2 EC2 servers, using python to run javascript Mapreduce . They have been clustered. Mainly used for "proof of concept". There are 50 keys in the bucket, all the map/reduce function does is re-format the data. This is only for testing the map/reduce functionality in Riak. Problem: The output only shows [{u'e': 2, u'undefined': 2, u'w': 2}]. That is completely wrong. The logs show that all the keys have "processed" but only 2 get returned. So my question is why is that

Erlang MapReduce on Riak database giving exception

别等时光非礼了梦想. 提交于 2019-12-11 03:14:23
问题 I am going through the tutorials of riak and Erlang, I have stored data in riak by the riak-erlang-client and i did the following: 1> {ok,Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087). {ok,<0.34.0>} 2> Val1 = [1,2,3]. [1,2,3] 3> MyBucket = <<"numbers">>. <<"numbers">> 4> Obj1 = riakc_obj:new(MyBucket,<<"ott">>,Val1). 5> riakc_pb_socket:put(Pid,Obj1). ok 6> {ok, Fetched} = riakc_pb_socket:get(Pid,MyBucket,<<"ott">>). {ok,{riakc_obj,<<"numbers">>,<<"ott">>, <<107,206,97,96,96,96,204,96

How to list all the bucket types in riak?

扶醉桌前 提交于 2019-12-11 03:09:21
问题 Using Riak Client(erlang), I can list all the buckets of the default bucket type. But how can I list all the bucket types? Or If I can't do this by the client, how can I find out about this? 回答1: For v2.1.4, riak-admin bucket-type list is what you are looking for. Other sub-commands for riak-admin bucket-type (taken from the riak docs at an earlier revision) include: Command Action Form create create or modify a bucket type create <type> <json> before activation activate activate a bucket

How to mock riak java client?

↘锁芯ラ 提交于 2019-12-11 02:15:18
问题 I'm trying to unit test code that uses com.basho.riak:riak-client:2.0.0. I mocked all riak client classes and was hoping to get a useless but working test. However, this fails with a null pointer: java.lang.NullPointerException at com.basho.riak.client.api.commands.kv.KvResponseBase.convertValues(KvResponseBase.java:243) at com.basho.riak.client.api.commands.kv.KvResponseBase.getValue(KvResponseBase.java:150) at com.basho.riak.client.api.commands.kv.FetchValue$Response.getValue(FetchValue

Riak: are links dissolved if the target is deleted?

穿精又带淫゛_ 提交于 2019-12-10 10:47:08
问题 When an item is deleted from a store are links automatically deleted from all of the documents linking to the now missing item? Or do we have a situation that's similar to a broken link on an HTML page? 回答1: No, links are not deleted automatically. Links are just a metadata stored with objects so to find all objects which link to a deleted object you need to traverse the whole database which is not reasonable. 来源: https://stackoverflow.com/questions/5113264/riak-are-links-dissolved-if-the