我有一个mapper和reducer,当我在管道版本中运行它们时工作正常:
cat data.csv | ./mapper.py | sort -k1,1 | ./reducer.py
我使用了弹性mapreducer向导,加载了输入,输出,引导程序等。引导程序成功,但我仍然在执行时出错。
这是我在第一步的stderr中遇到的错误......
+ /etc/init.d/hadoop-state-pusher-control stop
+ PID_FILE=/mnt/var/run/hadoop-state-pusher/hadoop-state-pusher.pid
+ LOG_FILE=/mnt/var/log/hadoop-state-pusher/hadoop-state-pusher.out
+ SVC_FILE=/mnt/var/lib/hadoop-state-pusher/run-hadoop-state-pusher
+ case $1 in
+ stop
+ echo 0
/etc/init.d/hadoop-state-pusher-control: line 35: /mnt/var/lib/hadoop-state-pusher/run-hadoop-state-pusher: No such file or directory
+ /etc/init.d/hadoop-state-pusher-control start
+ PID_FILE=/mnt/var/run/hadoop-state-pusher/hadoop-state-pusher.pid
+ LOG_FILE=/mnt/var/log/hadoop-state-pusher/hadoop-state-pusher.out
+ SVC_FILE=/mnt/var/lib/hadoop-state-pusher/run-hadoop-state-pusher
+ case $1 in
+ start
++ dirname /mnt/var/lib/hadoop-state-pusher/run-hadoop-state-pusher
+ sudo -u hadoop mkdir -p /mnt/var/lib/hadoop-state-pusher
+ echo 1
++ dirname /mnt/var/run/hadoop-state-pusher/hadoop-state-pusher.pid
+ sudo -u hadoop mkdir -p /mnt/var/run/hadoop-state-pusher
++ dirname /mnt/var/log/hadoop-state-pusher/hadoop-state-pusher.out
+ sudo -u hadoop mkdir -p /mnt/var/log/hadoop-state-pusher
+ disown %1
+ sleep 5
+ sudo -u hadoop /usr/bin/hadoop-state-pusher -server --pidfile /mnt/var/run/hadoop-state-pusher/hadoop-state-pusher.pid
+ exit 0
Command exiting with ret '0'
这很神秘。究竟是什么意思?
安装东西似乎有问题?哪个其他日志文件可能会提供信息,我应该在哪里看?
我尝试了一个我发现here的解决方案,只是让实例更大,但这不起作用,同样的错误信息。
答案 0 :(得分:1)
我正在查找错误的日志文件。有一个不同的(有6个?)实际上给了我一些有用的python调试信息。事实证明我使用了string interpolation.format("of this kind {}, not this kind with a digit {1}".vars(a,b))
在python<中不支持的{{1}} 2.7,默认安装在弹性mapreduce中使用的EC2图像上。