1

我在 Github 上关注本指南,但无法运行步骤 5中提到的示例 mapreduced 作业。

我知道这个文件不再存在:

/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar

而且我知道现在可以在这里找到相同的文件:

/usr/lib/hadoop-0.20/hadoop-examples-0.20.2-cdh3u6.jar

所以我的电话如下:

curl -v -X POST "http://computing.cosmos.lab.fiware.org:12000/tidoop/v1/user/$user/jobs" -d '{"jar":"/usr/lib/hadoop-0.20/hadoop-examples-0.20.2-cdh3u6.jar","class_name":"WordCount","lib_jars":"/usr/lib/hadoop-0.20/hadoop-examples-0.20.2-cdh3u6.jar","input":"testdir","output":"testoutput"}' -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN"

输入目录存在于我的 hdfs 用户空间中,其中有一个名为 testdata.txt 的文件。我的 hdfs 用户空间中不存在 testoutput 文件夹,因为我知道它会产生问题。

当我执行这个 curl 命令时,我得到的错误{"success":"false","error":1}不是很具有描述性。我在这里缺少什么吗?

4

1 回答 1

1

这刚刚用我的用户frb和该用户的有效令牌进行了测试:

$ curl -X POST "http://computing.cosmos.lab.fiware.org:12000/tidoop/v1/user/frb/jobs" -d '{"jar":"/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar","class_name":"wordcount","lib_jars":"/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar","input":"testdir","output":"outputtest"}' -H "Content-Type: application/json" -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxx"
{"success":"true","job_id": "job_1460639183882_0011"}

请注意“新”集群 (computing.cosmos.lab.fiware.org) 中带有 MapReduce 示例的胖 jar 位于/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar,如文档中所述。/usr/lib/hadoop-0.20/hadoop-examples-0.20.2-cdh3u6.jar是“旧”集群(cosmos.lab.fiware.org)中的胖罐子。

编辑 1

storage.cosmos.lab.fiware.org最后,用户在运行 Tidoop 的 FIWARE LAB (和)中的 Cosmos 的“新”集群对中没有帐户computing.cosmos.lab.fiware.org,但在另一个“旧”集群 ( cosmos.lab.fiwre.org) 中。因此,只需在“新”帐户中配置一个帐户即可解决此问题。

于 2016-05-19T06:08:33.970 回答