Add a way to launch MapReduce jobs

This implements a way to launch MapReduce jobs. The job description is
forced to be application/json, and likewise, the response will be in
JSON too.

A dev-dependency on data.json was added to make the test case nicer, and
to showcase how to use the map/reduce functionality.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
kria.bucket: Simplify the (call) invocation

Keywords can act as functions that look themselves up in their
arguments, therefore #(:keys %) is the same as :keys alone, in a
function context. With this in mind, the (call) invocation in
kria.bucket can be simplified.

Noticed when running lein kibit.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
kria.pb.object.get: Fix two typos in method names

Apparently, the methods are named .setNotfoundOk and .setDeletedvclock:
less capitalisation. Without this, trying to set the :not-found-ok or
:deleted-vclock properties would result in an IllegalArgumentException.

Found with lein eastwood.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
kria.pb.content: Fix setting the :charset

When a Content object has a :charset, the code failed in two ways: it
tried to use .setCharSet instead of .setCharset, and even tried to use
it on the ByteString, instead of the builder object.

This patch corrects both mistakes. Found via lein eastwood.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #6 from algernon/h/no-matching-method-fix

Fix a few mismatched method calls
Merge pull request #4 from algernon/f/mapreduce

Add a way to launch MapReduce jobs
Merge pull request #5 from algernon/h/kibit

kria.bucket: Simplify the (call) invocation
rename `mapreduce` to `map-reduce`
minor: formatting, whitespace
Add support for getting/setting bucket types

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Implement basic DT get / set

This implements the very basics of data-type get & set. The protocol
buffer wrappers for the various data types are not included in this
commit.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Add convenience wrappers for the Counter data-type

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Add wrappers for the Set data-type

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Implement getters for Counter and Set data-types

The getters wrap the supplied callback, and if the get succeeds, they
call the supplied function with the value already extracted.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Add tests for the Counter & Set data-types

To run the tests, one will need to run dev/riak-setup.sh as root *once*,
to create and activate the necessary bucket types.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>