NoSQL Zone is brought to you in partnership with:

Developer with experience in a variety of different systems and technologies, with a customer focus and balance with business goals. Particularly interested in backend and large scale systems, and also interested in high level architecture, and API design. Always open to feedback in order to keep learning and improving as a professional. Rodrigo is a DZone MVB and is not an employee of DZone and has posted 39 posts at DZone. You can read more from them at their website. View Full User Profile

Riak: Updated Examples For "Seven Databases in Seven Weeks"

08.19.2012
| 3233 views |
  • submit to reddit
In my last post, I showed you how to fix an example from from the "Seven Databases in Seven Weeks" to run against Riak 1.1.4. This post shows a few more updates to the book examples to get them to run against this more current version of Riak.

  • Search Precommit: page 87 shows the command to install riak_search_kv_hook as a precommit script. Like in the last post, it must have the "language" property to work properly. Otherwise the property is not applied - and no error is returned by Riak. This is the command that works against Riak 1.1.4:
curl -i -X PUT http://localhost:8091/riak/animals -H "Content-Type: application/json" -d '{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit","language":"erlang"}]}}'
  • Server port: pages 89 and 90 show command using "localhost:8098". It should read "localhost:8091". This is actually an erratum.

  • Access secondary index: page 90 shows command how to access secondary index, but with that command, I get the error "Invalid link walk query submitted." The proper command for Riak 1.1.4 is:
curl http://localhost:8091/buckets/animals/index/mascot_bin/butler
Published at DZone with permission of Rodrigo De Castro, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags: