经过一段时间的折腾,终于能在eclipse里面运行MR了。
主要是运行eclipse里面运行的用户必须是 hdfs里面的授权用户,否则报权限不足: permission deny.还有就是hdfs的路径要写对了,我自己的是:
还有,有时系统启动 start-all.sh后,需要等会儿才能在report里面看到 活着的datanode。
【节点报告】
[img]http://dl.iteye.com/upload/attachment/591591/12ecb54f-8e45-3672-a2c7-47e8c764d957.png[/img]
【节点存放数据】
[img]http://dl.iteye.com/upload/attachment/591593/9d49e6d9-5960-36e9-bc5c-7e625df754db.png[/img]
【命令行运行wordcount】
[img]http://dl.iteye.com/upload/attachment/591597/98df3197-967a-38c8-8be0-32fc01c782fd.png[/img]
【eclipse里面运行wordcount】
[img]http://dl.iteye.com/upload/attachment/591595/a6f08f0d-61bf-3acc-b699-093c7568a79d.png[/img]
【eclipse里面运行时的设置】
[img]http://dl.iteye.com/upload/attachment/591601/c99db979-dfc1-3bee-acdc-c0fd9c8830eb.jpg[/img]
【注意事项】
[img]http://dl.iteye.com/upload/attachment/591599/02c677df-38da-3d26-b9d9-57a3e3001379.png[/img]
主要是运行eclipse里面运行的用户必须是 hdfs里面的授权用户,否则报权限不足: permission deny.还有就是hdfs的路径要写对了,我自己的是:
hdfs://localhost:9000/usr/local/hadoop/hadoop-dir/hadoop-root/tmp/cjd hdfs://localhost:9000/usr/local/hadoop/hadoop-dir/hadoop-root/tmp/output-dir2
还有,有时系统启动 start-all.sh后,需要等会儿才能在report里面看到 活着的datanode。
【节点报告】
[img]http://dl.iteye.com/upload/attachment/591591/12ecb54f-8e45-3672-a2c7-47e8c764d957.png[/img]
【节点存放数据】
[img]http://dl.iteye.com/upload/attachment/591593/9d49e6d9-5960-36e9-bc5c-7e625df754db.png[/img]
【命令行运行wordcount】
[img]http://dl.iteye.com/upload/attachment/591597/98df3197-967a-38c8-8be0-32fc01c782fd.png[/img]
【eclipse里面运行wordcount】
[img]http://dl.iteye.com/upload/attachment/591595/a6f08f0d-61bf-3acc-b699-093c7568a79d.png[/img]
【eclipse里面运行时的设置】
[img]http://dl.iteye.com/upload/attachment/591601/c99db979-dfc1-3bee-acdc-c0fd9c8830eb.jpg[/img]
【注意事项】
[img]http://dl.iteye.com/upload/attachment/591599/02c677df-38da-3d26-b9d9-57a3e3001379.png[/img]