FAQ Database Discussion Community


Raik secondary indexes (2i) - write performance

performance,riak,leveldb,secondary-indexes
What is the performance impact of including secondary indexes (2i) in an object written to Riak? Let's consider two scenarios, both with a large number of objects within one bucket. Each object has a secondary index, let's call it example_bin (but it could be an integer index as well): Almost...

Riak mapReduce fails with > 15 records

mapreduce,erlang,riak
Problem I've been learning Riak and ran into an issue with mapReduce. My mapReduce functions work fine when there's 15 records, but after that, it throws a stack trace error. I'm new to Riak and Erlang, so I'm unsure whether it's my code or it's Riak. Any advice on how...

What Happens to Riak Links When One Object is Deleted?

riak
In Riak, if a link is created from object A to object B, and object B is then deleted, what happens to the link stored in the metadata of object A? Must the link be manually deleted? Or is it automatically deleted?

Trouble with PUT/GET in Riak testing

riak
I'm working on a little e2 application that needs to put/get data to/from riak. I apparently have a misunderstanding about some things. I can successfully put and get key-value pairs to a bucket using the erlang client. However, when I try to curl the data out, I get nothing. In...

How to list all the bucket types in riak?

erlang,riak
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?

Riak's erlang pb client and map fetch

erlang,riak
I am trying to store a map of registers and sets in Riak and process them using Riak's pb client. My goal here is to save the map, then extract the persisted map from the returned object and process it (in this case extract the registers, values from sets and...

Modelling a leaderboard/ranking list in Riak

solr,ranking,riak,leaderboard
I am currently researching databases for a scalable game backend. Riak looks very nice from an operational point of view. I can easily see how to model user and game data and statistics in Riak. But I have trouble with leaderboards/ranking lists. Assuming we have millions of players and the...

Riak CS LDAP authentication

authentication,ldap,riak,riak-cs
I read here that Riak CS supports LDAP for authentication: http://bit.ly/1Rb2yTF "Pluggable Authentication/Authorization for Integration with Existing Infrastructure – Riak CS provides an extensible authentication system, enabling integration with existing directory services (LDAP, ActiveDirectory, NIS, PAM)." However I cannot find anything relating to the LDAP authentication configuration in the docs....

riak_core node rebalance pending

riak
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...

Riak Cluster Backup

database,nosql,riak
We have a five node Riak cluster(n_val is 3) running on Amazon EC2 spread across multiple availability zones. Since we don't have enterprise edition, we do not have the luxury of multi datacenter replication and a full sync to a different zone/region. Our current backup strategy is this: SSH to...

Riak search returning “No index” and “(23) Failed writing body”

ruby,bash,riak,riak-search
I have a test system and I've created and activated libraries as a search property on the bucket type clients. ➜ riak-2.1.0 curl http://localhost:8098/buckets/coding-with-riak/props...

boot2docker resulting in “Cannot connect to the Docker daemon. Is 'docker -d' running on this host?”

docker,riak,boot2docker
I'm new to docker and trying to run this project on OS X 10.10. Docker is installed through brew and looks good in the basics: ➜ docker-riak git:(develop) docker -v Docker version 1.6.2, build 7c8fca2 ➜ docker-riak git:(develop) boot2docker -v Boot2Docker-cli version: v1.6.2 Git commit: cb2c3bc Here's the error: ➜...

Can I change allow_mult to false on map bucket/bucket type in riak?

riak,bucket
How can I change the allow_mult property to false on map data type bucket or bucket type? I tried this but not working. >riak-admin bucket-type update maps '{"props":{"allow_mult":false}}' Error updating bucket type maps: Cannot change datatype bucket from allow_mult=true ...

How to get fetch particular key from map in Riak?

riak
I can't seem to find out how to fetch a particular key(register, flag, counter or set) from within a map data type in Riak. Is this even possible? Or do I always need to fetch the entire map into my application layer? I was thinking there would be something similar...

How to mock riak java client?

java,junit,mockito,riak
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.java:171) My test looks like this: @Test public void...

Deleting an element from a Riak set via protocol buffers using the Erlang client without fetching the whole set

erlang,protocol-buffers,riak
Via the HTTP API, we can delete an arbitrary element from a set without fetching the whole content: curl -X POST http://127.0.0.1:8098/types/sets/buckets/travel/datatypes/cities -H "content-type: application/json" -d '{ "remove" : "Toronto" }' (to verify: tcpdump -i any -s 0 -n 'src port 8087 or src port 8098 and host 127.0.0.1') However...

Riak backend choice: bitcask vs leveldb

database,riak
I'm planning to use Riak as a backend for a service that stores user session data. The main key used to retrieve data (binary blob) is named UUID and actually is a uuid, but sometimes the data might be retrieved using one or two other keys (e.g. user's email). Natural...

How to test java code that uses Basho's riak-java-client?

java,unit-testing,riak
I'm creating a small java service that returns a list of restaurants depending on the selected place. Data is retrieved from Riak using com.basho.riak:riak-client:2.0.0 and the read operation is wrapped in a TenacityCommand. Important classes are described below and I would be happy if you could assist me in creating...

How does Riak nodes distribute data

database,amazon-web-services,riak
We have a single production node of riak for our game. We would like to backup our database constantly, so we decided to start up some other nodes. We're trying to use AWS free tier. What we see is that some parts of data just moved to second node, leaving...

Riak - With Bitcask do the keys have to fit into the total ram of all nodes, or in the ram of every node?

riak
So say there are 5 nodes, with 8gb of RAM each. Do we have 40GB of RAM to store the key space in, or is it 8gb?

Can Riak be used with a third party key value store as the backend

backend,riak,key-value-store
Can Riak be configured to use a third party backend? In a prior question a Basho employee said that you could "edit the config file and restart the server". What else would you need to do to connect a backend vey value store such as rocksDB (built as a shared...

riak_core vnode distribution

erlang,riak
I have a setup with riak_core application on 2-node cluster. The template for the application was generated following https://github.com/rzezeski/try-try-try/tree/master/2011/riak-core-first-multinode When I look at the distribution of vnodes across 2 nodes: {ok, Ring} = riak_core_ring_manager:get_my_ring(), riak_core_ring:chash(ring). , I'm getting this: {64, [{0, '[email protected]'}, {22835963083295358096932575511191922182123945984, '[email protected]'}, {45671926166590716193865151022383844364247891968, '[email protected]'},...

Multiple queries in Riak

solr,riak,riak-search
I am querying my Riak database through the HTTP API like so: /select?q=+build:2702168+hypervisors:500&q.op=and&wt=json&sort=tstart_int%20desc" but all other query parameters than the first one gets ignored. So in this case, it returns all entries that fulfill build:2702168, but ignores hypervisors:500. This piece of documentation, although old, shows that you can do regular...

maven plugin error after importing project to eclipse

eclipse,maven,riak
I've imported a Basho Riak Java library as an eclipse project after git cloning it, using the Existing Maven Projects import dialog option of eclipse. I have done that in order to explore this library using eclipse's Open Declaration feature, in order to better use this library. I am getting...

Riak leveldb Corruption

riak,leveldb
I'm having the following error : @riak_kv_vnode:maybe_create_hashtrees:178 riak_kv/456719261665907161938651510223838443642478919680: unable to start index_hashtree: {error,{{bad match,{error,{db_open,"Corruption: truncated record at end of file"}}} Full log here : http://pastebin.com/Lgaqw2Wu Running Version : Riak : riak_2.0.2-1_amd64.deb OS : Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty Tried vnode repair , partition repair...