Created
March 5, 2012 18:41
-
-
Save tovbinm/1980242 to your computer and use it in GitHub Desktop.
Using riak-js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup: | |
npm install riak-js@latest | |
Usage: | |
node -e "require('riak-js').getClient({ host: 'hostname', port: 8098 }).count('bucket');" | |
(More here: https://github.com/frank06/riak-js) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c = require('riak-js').getClient({ host: 'hostname', port: 8098 }); | |
var mr = c.add('bucket').map(function m(v){return [1]}).reduce(function(v) { return [v.reduce(function(t, val) { return t + val; }, 0)]}); | |
mr.run({timeout: 10000000}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment