map reduce time outs

David Montgomery davidmontgomery at
Sat Oct 13 03:40:24 EDT 2012


I am trying to run this map reduce job.  I get a time out.  Logic
would dictate that I add a time out to the RiakClient but that flag is
not there.  How do I deal with timeouts with the python api?  I have
data...I just cant get it out.

ile "/usr/local/lib/python2.7/dist-packages/riak-1.5.0-py2.7.egg/riak/transports/",
line 321, in mapred
    (repr(response[0]), repr(response[1])))
Exception: Error running MapReduce operation. Headers: {'date': 'Sat,
13 Oct 2012 07:26:31 GMT', 'content-length': '19', 'content-type':
'application/json', 'http_code': 500, 'server': 'MochiWeb/1.1
WebMachine/1.9.0 (someone had painted it blue)'} Body:

client  = riak.RiakClient(host='',port=8087,
    query = client.add('impressions')'''
    function(value, keyData, arg) {
        var data = Riak.mapValuesJson(value)[0];

            var alt_key = data['hw'] + '_' + data['adx'];
            var obj = {};
            obj[alt_key] = 1;
            return [ obj ];
           return [];


    function(values, arg){
        return [ values.reduce( function(acc, item) {
            for (var state in item) {
                if (acc[state])
                    acc[state] += item[state];
                    acc[state] = item[state];
            return acc;

    for result in
        print result

More information about the riak-users mailing list