无模块的Pydoop误差

时间:2013-07-10 21:56:12

标签: python hadoop

我正在运行一个简单的pydoop程序来计算“alice.txt”中的单词。然而得到一个奇怪的错误。我不确定是否缺少某些模块或代码是错误的。

Pydoop代码:

#!/usr/local/bin/python

import pydoop

def mapper(_,text,writer):
        for word in text.split():
                writer.emit(word,"1")

def reducer(word,icounts,writer):
        writer.emit(word,sum(map(int,icounts)))

def combiner(word,icounts,writer):
        writer.count('combiner calls', 1)
        reducer(word,icounts,writer)

安装和运行pydoop代码的步骤:

pydoop script -c combiner wc.py alice.txt a.txt

错误:

ImportError: No module named _hdfs_2_0_0_cdh_4_3_0

0 个答案:

没有答案