Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Implementation of MapReduce over HTTP #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kender-janrain
Copy link

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.

implicit val actorSystem = ActorSystem()
val riakClient = RiakClient(actorSystem, "localhost", 8098)

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

val result = {
    import RiakMapReduce._
    riakClient.mapReduce(InputBucket("bucket"))
        .map(JsBuiltin("Riak.mapValuesJson"))
        .reduce(JsSource(src("reduce1.js")))
        .map(JsSource(src("map2.js")))
        .reduce(JsSource(src("reduce2.js")))
        .result[List[Int]]
}
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.

@agemooij
Copy link
Owner

agemooij commented Apr 4, 2013

Hi Kender

First of all, thanks you very much for being the first to submit a pull request for riak-scala-client. I'm a bit busy at the moment but I'll have a look at your code as soon as possible, probably this weekend, and get back to you.

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

Successfully merging this pull request may close these issues.

2 participants