簡體   English   中英

嘗試使用 Tidoop REST API 在 FIWARE-Cosmos 上運行 MapReduce 作業時出錯

[英]Error while trying to run a MapReduce job on FIWARE-Cosmos using Tidoop REST API

我正在 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}這不是很具有描述性。 有什么我在這里想念的嗎?

這剛剛使用我的用戶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) 中的胖 jar。

編輯 1

最后,用戶在 Tidoop 運行的 FIWARE LAB( storage.cosmos.lab.fiware.orgcomputing.cosmos.lab.fiware.org )的“新”對 Cosmos 集群中沒有帳戶,但在另一個“舊”集群( cosmos.lab.fiwre.org )。 因此,只需在“新”帳戶中配置一個帳戶即可解決該問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM