• + 0 comments

    For the python2 version the final part of the code stub needs to be corrected to:

    if __name__ == '__main__':
        N = 0
        inputData = []
        counter = 0
        for line in sys.stdin:
            if counter > 0:
                inputData.append(json.dumps({"key":counter,"value":int(line.strip())}))
            counter += 1
        mapReducer.execute(inputData, mapper, reducer)