2

我橫貫彈性MapReduce,並保持擊中,出現以下錯誤的亞馬遜的例子運行:亞馬遜彈性MapReduce:輸出目錄

Error launching job , Output path already exists.

這裏是跑,我現在用的是作業的命令:

C:\ruby\elastic-mapreduce-cli>ruby elastic-mapreduce --create --stream \ 
    --mapper s3://elasticmapreduce/samples/wordcount/wordSplitter.py \ 
    --input s3://elasticmapreduce/samples/wordcount/input \ 
    --output [A path to a bucket you own on Amazon S3, such as, s3n://myawsbucket] \ 
    --reducer aggregate 

Here is where the example comes from here

我下面的輸出目錄Amazon'd方向。存儲桶名稱是s3n://mp.maptester321mark/。我已經通過自己的所有建議找問題上this url

這裏是我的credentials.json信息:

{ 
"access_id": "1234123412", 
"private_key": "1234123412", 
"keypair": "markkeypair", 
"key-pair-file": "C:/Ruby/elastic-mapreduce-cli/markkeypair", 
"log_uri": "s3n://mp-mapreduce/", 
"region": "us-west-2" 
} 
+0

爲什麼啊,爲什麼必須S3迫使我們每次創建新的目錄? – 2014-06-15 05:45:49

回答

3

Hadoop作業就不會破壞已經存在的目錄。您只需要運行:

hadoop fs -rmr <output_dir> 

在您的工作之前ot只需使用AWS控制檯刪除目錄。

+0

我已經在開始工作前刪除了目錄,但仍然會引發此錯誤。 – 2012-07-30 02:05:19

+0

您是否能夠驗證它實際上已被刪除? – 2012-07-30 03:17:55

+0

嘗試不同的輸出目錄 – 2012-07-30 04:08:53

4

用途:

--output s3n://mp.maptester321mark/output 

代替:

--output s3n://mp.maptester321mark/ 

我想EMR使輸出鬥運行之前,這意味着你已經有你的輸出目錄/如果指定--output s3n://mp.maptester321mark/和可能是你得到這個錯誤的原因。

0

--->如果文件夾(存儲桶)已經存在,則將其刪除。

--->如果你刪除它,你仍然可以得到上面的錯誤,確保你的輸出是這樣的 S3N:// some_bucket_name/your_output_bucket如果你有像這樣S3N:// your_output_bucket/ 它的一個問題與EMR!因爲我認爲它首先在路徑上創建存儲桶(some_bucket_name),然後嘗試創建(your_output_bucket)。

感謝 哈日