Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting of content_type for the riakc_pb driver #102

Merged
merged 4 commits into from
Dec 10, 2013

Conversation

cdahlqvist
Copy link

This change allows the content type of objects to be specified when inserting or updating values, making it possible to generate objects containing text data that Riak Search and Yokozuna can index for benchmarks.

An example configuration file, ./examples/riakc_pb_text.config, shows how this can be achieved based on a sample text file has also been provided (./examples/AroundTheWorldIn80Days.txt). This creates and updates objects with a random, continuous 1000 byte sequence from the text.

Christian Dahlqvist added 2 commits September 16, 2013 18:50
@slfritchie
Copy link
Contributor

Christian, any chance you'd also be able to hunt down this PB client return, added recently IIRC? It makes testing difficult: I get this error about 0.3 seconds after basho_bench has finished its init phase.

14:46:45.310 [error] Worker <0.94.0> exited with {{case_clause,siblings},[{basho_bench_worker,worker_next_op,1,[{file,"src/basho_bench_worker.erl"},{line,241}]},{basho_bench_worker,max_worker_run_loop,1,[{file,"src/basho_bench_worker.erl"},{line,314}]}]}

@uwiger
Copy link

uwiger commented Nov 19, 2013

Any progress on the problem highlighted by @slfritchie above? I'm seeing this problem too.

Robj2 = riakc_obj:update_value(Robj, ValueGen()),
[M | _] = riakc_obj:get_metadatas(Robj),
Robj1 = riakc_obj:update_metadata(Robj, M),
Robj2 = riakc_obj:update_value(Robj, ValueGen(), State#state.content_type),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Christian, you probably mean to use Robj1 somehow? I'm assuming line 214 is where you want to use it.

@slfritchie
Copy link
Contributor

I've got one review comment that needs to be addressed, but it's quick. Everything else looks good, feel free to merge when the fix & final test is done, thanks!

slfritchie added a commit that referenced this pull request Dec 10, 2013
Enable setting of content_type for the riakc_pb driver
@slfritchie slfritchie merged commit 5fa4fee into master Dec 10, 2013
@slfritchie
Copy link
Contributor

I'm assuming Christian doesn't mind the merge. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants