agemooij/riak-scala-client — pull request #11 by kender-janrain (2013-04-03 23:24:06+00:00)
Title: Implementation of MapReduce over HTTP

Hi there! I've put together an implementation of MapReduce that I'd like to submit. The interface is fairly straight forward, here's an example.

```scala
implicit val actorSystem = ActorSystem()
val riakClient = RiakClient(actorSystem, "localhost", 9098)

def src(name: String) = Source.fromInputStream(getClass.getClassLoader.getResourceAsStream(name)).mkString

val result = riakClient.mapReduce(RiakMapReduce.InputBucket("bucket")).query[List[String]](
map = List(
RiakMapReduce.JsSource(src("map1.js")),
RiakMapReduce.JsSource(src("map2.js"))),
reduce = RiakMapReduce.JsSource(src("reduce1.js")))

println(Await.result(result, 10.seconds))
```

If you like the interface and the methodology of the implementation, I'd be happy to provide specs as well.