尝试使用Tidop REST API在FIWARE-Cosmos上运行MapReduce作业时出错



我在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的文件。testoutput文件夹在我的hdfs用户空间中不存在,因为我知道它会产生问题。

当我执行这个curl命令时,我得到的错误是{"success":"false","error":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.constos.lab.fiware.org)中的带有MapReduce示例的胖罐子位于/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

最后,用户在Tidoop运行的FIWARE LAB中的"新"Cosmos集群对(storage.cosmos.lab.fiware.orgcomputing.cosmos.lab.fiware.org)中没有帐户,而是在另一个"旧"集群(cosmos.lab.fiwre.org)中。因此,只需在"新"帐户中设置一个帐户就可以解决这个问题。

最新更新