Questions tagged [riak]

1

votes
1

answer
27

Views

riak spark connector doesn't work

My Riak-Spark connector doesn't work. I can launch Spark with: /opt/spark/bin/spark-shell \ --jars com.fasterxml.jackson.module_jackson-module-scala_2.11-2.4.4.jar \ --conf spark.riak.connection.host=127.0.0.1:8087 \ --packages com.basho.riak:spark-riak-connector_2.11:1.6.3 But when I run: import co...
user2405703
1

votes
0

answer
29

Views

Confusing netty IllegalAccessErrror 4.1.5.Final

I've started seeing an error in production that's new to me. It looks like the Java Riak client driver hit an error and then I've been spammed with thousands of errors from netty. This is the stack trace I'm seeing: java.lang.IllegalAccessError: io/netty/channel/AdaptiveRecvByteBufAllocator$Handle...
Dio
0

votes
1

answer
118

Views

Java Riak Connection Problems

trying to connect my Java Eclipse to a Riak server on Linux Ubuntu. Followed up some guides but still don't working. Using: - Riak-Client-2.0.2 - Eclipse Oxygen.1a Release (4.7.1a) - Ubuntu 16.04.3 - openjdk version '1.8.0_151' Have had some problems before with slf4j so i added a external jar: slf4...
Varothem
1

votes
3

answer
426

Views

Distributed datastore

We're trying to add some kind of persistence in our app. The app generates about 250 entries per second. Each of these entries belong to one of 2M files. For each file, we want to keep the last 10 entries, so we can look them up later. The way our client application works : it gets a stream of all...
1

votes
1

answer
322

Views

riak, cpp library and build errors

I am new to riak and building libraries with scons. I download the cpp library from https://github.com/ajtack/riak-cpp.git. I am on ubuntu 64. Here is my gcc version: gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) From the command prompt enter: > scons . So...did I do something wrong with scons...
1

votes
1

answer
419

Views

How to use bitcask as a stand alone

(edit: i miss some reputation to create the bitcask tag so ...) (tl;dr => bitcask:get/2 doesn't work and raises badarg in bitcask_nifs:keydir_get_int) I would like to know how to use bitcask without riak the right way. First, i was trying this: bitcask:put(Handle, 3, {this, is, data}). bitcask:get(H...
niahoo
1

votes
2

answer
347

Views

Finding maximum value for numeric secondary index in Riak

Given a numeric secondary index in Riak I can do range queries, like: 'Find me all values* with index 'sn' between 1 and 10'. Is there a way to find the maximum value for a numeric index? I.e. 'Find me a maximum value of index 'sn'. * It actually finds all primary keys (not the values themselves), b...
Dimagog
1

votes
1

answer
327

Views

5 node Riak setup: 100 ops/sec throughput. What am I doing wrong?

Here is my setup of Riak 1.1.4 5 Nodes ami-a29943cb (EC2 AMI) m1.large (7.5GB Ram, 4 EC2 compute instances) EBS storage LevelDB backend Python Client with Protobuf (on a separate machine) I tried running basho benchmark on the setup and it showed 100 ops/sec throughput. After talking to people or Ri...
spicavigo
1

votes
1

answer
364

Views

How to model Cassandra's super column family using Riak?

We are investigating on choosing a nosql database for our web service. We have tried Cassandra and successful model our original MySQL data using Cassandra column family and super column family. It's a pretty interesting experience. Now, we start to look into Riak and wondering how the Cassandra's s...
tom
1

votes
1

answer
423

Views

Riak search queries via the java client

I am trying to perform queries using the OR operator as following: MapReduceResult result = riakClient. mapReduce('some_bucket', 'Name:c1 OR c2'). addMapPhase(new NamedJSFunction('Riak.mapValuesJson'), true). execute(); I only get the 1st object in the query (where name='c1'). If I change the order...
o'mac
1

votes
2

answer
421

Views

Riak - MapReduce sorting over fields

How can I use the sorting functions over 'real' fields in the stored objects? How can I set the field on which I want to sort by? It seems that the following refers to the key, in my case it's a UUID, and therefore useless to sort by: MapReduceResult result = riakClient. mapReduce('some_bucket'). ad...
o'mac
1

votes
1

answer
707

Views

Rebar generated start up script not loading dependencies

I'm very new to Erlang and using Rebar but we are doing a project that needs to connect to a Riak server, for this I'm trying to use the Riak Erlang client (riakc_pb_socket etc). The problem is that the shell that is started from my start up script (generated by Rebar and reltool) does not include t...
1

votes
2

answer
945

Views

Using secondary index and key filter together in RIAK mapred

Is possible to use sec index and key filters together in a map reduce query. Something like this *{'inputs':{ 'bucket' :'ignore_bucket1', 'index' :'secindex_bin', 'key' :'secIndexVal', 'key_filters':[['and', [['tokenize', '-', 5], ['greater_than_eq', '20120101']], [['tokenize', '-',...
Narayanan Nachiappan
1

votes
1

answer
266

Views

Riak Search JSON list

I wonder how you can search in Riak Search for list items. e.g.: { 'name': 'Zombies Eat Brains', 'tags': ['zombies', 'funny', 'lol'] } search-cmd search objects ???
igorgue
1

votes
2

answer
1.3k

Views

Map Reduce query in erlang

I'm trying to write a mapreduce query in erlang for riak but I'm having trouble getting my head around it. Does anyone know where I can find an example of an erlang mapreduce query, or can write one, that will perform the SQL equivalent of a count operation? It would also be helpful if someone coul...
Nickel
1

votes
1

answer
470

Views

Riak-Java cannot deserialize domain objects from MapReduce query in Scala?

Performing a MapReduce query on a simple bucket. For some reason, I am getting an exception from Jackson: Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.threetierlogic.AccountService.models.User out of START_ARRAY token at [Source: [email protected]
crockpotveggies
1

votes
2

answer
372

Views

What is the Riak per-key overhead using the Bitcask backend?

It's a simple question with apparently a multitude of answers. Findings have ranged anywhere from: a. 22 bytes as per Basho's documentation: http://docs.basho.com/riak/latest/references/appendices/Bitcask-Capacity-Planning/ b. 450~ bytes over here: http://lists.basho.com/pipermail/riak-users_lists.b...
Dev Kanchen
1

votes
1

answer
292

Views

Riak inserting a list and querying a list

I was wondering if there was a effecient way of handling arrays/lists in Riak. Right now I'm storing the whole array as a string and searching the string to find out if a element exists in the array. ID (key) : int[] (Value) And also How do I write a map/reduce query to give all the keys for which...
1

votes
1

answer
583

Views

How long should this Riak Map Reduce query take?

I have a bucket with approximately 900,000 records. The majority of those records have a status of PERSISTED in a secondary index. I want to retrieve all base_urls and a count of how many documents belong to each base_url for all docs that are marked PERSISTED. Here is the query: curl -X POST -H 'co...
chaimp
1

votes
1

answer
211

Views

how to set 2i with riak local client

does anyone know how i set 2i to object that created with riak_object OBJ = riak_object:new() i want to work with riak local client and i trying to do something similar to this: Obj1 = riakc_obj:new(Bucket, UniqKey, Tablet), MD1 = riakc_obj:get_update_metadata(Obj1), MD2 = riakc_obj:set_secondary_...
Alon Rolnik
1

votes
1

answer
389

Views

How to fetch Riak object, change its value and store it back with all indexes in Python

I am using Riak database to store my Python application objects that are used and processed in parallel by multiple scripts. Because of that, I need to lock them in various places, to avoid being processed by more than one script at once, like that: riak_bucket = riak_connect('clusters') cluster = r...
SpankMe
1

votes
1

answer
144

Views

Riak and time-sorted records

I'd like to sort some records, stored in riak, by a function of the each record's score and 'age' (current time - creation date). What is the best way do do a 'time-sensitive' query in riak? Thus far, the options I'm aware of are: Realtime mapreduce - Do the entire calculation in a mapreduce job,...
Jason S
1

votes
1

answer
422

Views

Keeping the latest erlang but running riak's make devrel

I'm reading this tutorial: http://docs.basho.com/riak/1.1.4/tutorials/fast-track/Building-a-Development-Environment/ I installed riak from the .deb package in ubuntu. If I run riak start it will say 'node is already running!' the second time I do it. I downloaded the riak source. The tutorial wants...
Jimmy Ruska
1

votes
1

answer
334

Views

Error with riak erlang protobuffs

I'm Following this guide http://docs.basho.com/riak/latest/dev/advanced/mapreduce/ After following this guide to setup 5 nodes http://docs.basho.com/riak/latest/quickstart/ start() -> {ok, Client} = riakc_pb_socket:start('127.0.0.1', 10018), Mine = riakc_obj:new(, , term_to_binary(['eggs', 'bacon'])...
Jimmy Ruska
1

votes
1

answer
131

Views

Discovering all Riak nodes from a known node?

If I know one the IP address of one Riak node, how do I use the Riak API to discover the other nodes? Update 2013-10-22 5:37 PM CST: One of the reasons I want to do this is to detect network partitions. Being aware of them could be helpful. If my dev-ops infrastructure knows the list of Riak machine...
David J.
1

votes
2

answer
378

Views

Querying Riak data in one fetch

I am using the Riak java client to perform a date range query in the 2i (Secondary Index). This query returns a list of keys, which I submit again to Riak to fetch the entries. Is there a way to execute these two queries in one go, so that I can save time on server round trip. Here is my code snippe...
systemboot
1

votes
1

answer
577

Views

Paging get all keys on riak with Java Api

we are currently testing out Riak, we have in Riak a huge bucket with millions of keys and I need to query all the keys and save them in a file. We are using Java as the API. Is there any way to get the result of the query paged?
Shimon Benattar
1

votes
3

answer
790

Views

java.io.EOFException while retrieving data from Riak

I am trying to execute a simple fetching of data as a string from Riak. We are trying to execute a sample code and we are getting the error. It's a Java code written for fetching data from Riak I made sure riak is running by Sudo Riak Start Error as follows: Exception in thread 'main' com.basho.riak...
Dark Knight
1

votes
1

answer
337

Views

riak / python: unable to run a store() command

Attempting to follow the tutorial here. After doing basic CRUD stuff, the tutorial has you edit the app.config file to use the LevelDB Backend for 2i, which in my case meant updating line 83 of /usr/local/Cellar/riak/1.4.2/etc/app.config from {storage_backend, riak_kv_bitcask_backend}, to {storage_b...
fox
1

votes
1

answer
181

Views

Is it possible to use riak MapReduce on XML data

If I store lots of XML documents in riak, and then want to query it using MapReduce, how can I use XPath in my map function? The examples show JSON: var data = JSON.parse(v.values[0].data); But I want to do something like: var data = XML.selectNode('/root/XPath/to/my/node'); Is this possible, or is...
Tim
1

votes
2

answer
280

Views

fastest way to read multiple documents from Riak

I have tried reading the documents in different format, I have an array of keys to use for reading. Each batch contains 1000 keys. I have 6 riak nodes. I do reads with r=1. I connect each time to the same riak node. Documents are just profile fields, so it's not something big. I've checked the CPU a...
Pentium10
1

votes
1

answer
74

Views

Is Riak a viable choice for dynamic network environments?

We are considering Riak for use in an embedded device context (embedded Linux) where devices are dynamically addressed (DHCP). Is this a viable choice? We can assume that appropriate auto-discovery protocols are in place to enable devices to discover each other. Upon joining the network, a device w...
akatkinson
1

votes
1

answer
809

Views

How to perform a bulk insert with Riak?

How do I insert millions keys into a Riak bucket? Inserting them one at a time takes too long. Ideally I'd like something like MySQL's 'LOAD DATA INFILE'.
Jay
1

votes
1

answer
91

Views

Riak MapReduce - map works, reduce receives very small subset of results

I'm using Riak 2.0.0b1 on Ubuntu 12.10 (up to date). This is a developer box, so I have only one Riak instance - no clusters, etc. I've put about 100k JSON documents (about 300 bytes each) into a bucket and now am trying to mapreduce over it. The data is random and I've also got 2i index on one of t...
Baczek
1

votes
1

answer
268

Views

Riak simple query doesn't return data - Riak Java Client

The below snippet is rather simple, and by looking at others examples it should have worked val result = client.mapReduce('some-users','firstName:Scala').execute println(result.getResultRaw)// It just prints '[]' But, the record with firstName:Scala actually is there in the bucket. Running this code...
mane
1

votes
1

answer
41

Views

Use of “AND” operation in mapreduce

SQL- select * from table_name where userid='Kim' AND weak = 1 As above SQL query i would like to do same query in mapreduce. How to implement 'AND' operator in my case. val result = riakClient.mapReduce(USERS_BUCKET_NAME,'userID:'+userID) .addMapPhase(new NamedJSFunction('Riak.mapValuesJson'),true)...
Uraniium
1

votes
1

answer
49

Views

Must Riak save the entire map at once?

I read that you can't append to a value in Riak. Does this extend to the Riak Datatypes that have been added? i.e. If i modify a register, counter, or flag in a map in Riak. Must it rewrite the entire map to the underlying value?
DragonFax
1

votes
1

answer
112

Views

How to extract text/tweet from Riak Object? (erlang)

I've stored some thousand tweets in my Riak Node and fetching one of them returns the following: {riakc_obj,,, , [{{dict,2,16,16,8,80,48, {[],[],[],[],[],[],[],[],[],[],[],[],...}, {{[],[],[],[],[],[],[],[],[],[],...}}},
CloudStrife
1

votes
1

answer
387

Views

Riak Data Types and Search

I'm using Riak 2.0.2 and Riak-Erlang-Client 2.0.0 The documentation suggest that 'Search is preferred for querying', here the full excerpt : In general, you should consider Search to be the default choice for nearly all querying needs that go beyond basic CRUD/KV operations. If your use case demands...
toopay
1

votes
2

answer
360

Views

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

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 ass...
Mrtn

View additional questions