2013-02-11 20 views
2

我對Hadoop版本和新的API非常困惑。我有一個關於Hadoop 0.20.203的項目,我認爲是時候升級它了。我希望使用具有YARN的版本,該版本是0.23或2.0.2。由於根據Hadoop站點的2.0.2類似0.23但更好,我已經導入了2.0.2版本。新的API應該在org.apache.hadoop.mapreduce中,而不是在org.apache.hadoop.mapred中,我已經從0.20版本獲得了這個包,所以我不必改變任何東西。 Job類的所有構造函數都被棄用,所以我應該如何使用這個類?當我運行我的項目時,我也收到很多棄用警告,提到mapred軟件包。Hadoop發佈和新的API

我編輯我的問題,包括過時的東西,我有我的輸出

13/02/12 00:52:57 WARN conf.Configuration: mapred.jar is deprecated. Instead, use mapreduce.job.jar 
13/02/12 00:52:57 WARN conf.Configuration: mapred.cache.files is deprecated. Instead, use mapreduce.job.cache.files 
13/02/12 00:52:57 WARN conf.Configuration: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces 
13/02/12 00:52:57 WARN conf.Configuration: mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.value.class 
13/02/12 00:52:57 WARN conf.Configuration: mapred.mapoutput.value.class is deprecated. Instead, use mapreduce.map.output.value.class 
13/02/12 00:52:57 WARN conf.Configuration: mapreduce.map.class is deprecated. Instead, use mapreduce.job.map.class 
13/02/12 00:52:57 WARN conf.Configuration: mapred.job.name is deprecated. Instead, use mapreduce.job.name 
13/02/12 00:52:57 WARN conf.Configuration: mapreduce.reduce.class is deprecated. Instead, use mapreduce.job.reduce.class 
13/02/12 00:52:57 WARN conf.Configuration: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir 
13/02/12 00:52:57 WARN conf.Configuration: mapred.output.dir is deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir 
13/02/12 00:52:57 WARN conf.Configuration: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize 
13/02/12 00:52:57 WARN conf.Configuration: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps 
13/02/12 00:52:57 WARN conf.Configuration: mapred.cache.files.timestamps is deprecated. Instead, use mapreduce.job.cache.files.timestamps 
13/02/12 00:52:57 WARN conf.Configuration: mapred.output.key.class is deprecated. Instead, use mapreduce.job.output.key.class 
13/02/12 00:52:57 WARN conf.Configuration: mapred.mapoutput.key.class is deprecated. Instead, use mapreduce.map.output.key.class 
13/02/12 00:52:57 WARN conf.Configuration: mapred.working.dir is deprecated. Instead, use mapreduce.job.working.dir 
+0

什麼錯誤? – 2013-02-12 06:15:44

+0

爲什麼不按照警告中的建議使用新API中的相應類? – Amar 2013-02-13 19:27:44

+0

Praveen我沒有收到任何錯誤,我只是對發佈和API感到困惑。我想我將使用1.X.X系列,因爲我不會大規模使用它。 Amar我沒有使用任何mapred package.I只使用mapreduce package.Dont知道爲什麼我得到這些警告。 – jojoba 2013-02-14 14:31:18

回答

0

有跡象表明,發生20.2xx/1.x和之間WRT MapReduce框架兩大變化0.21/0.22/0.23/2.x版本

  • 爲了更好地反映什麼是服務器端配置屬性和什麼是客戶端配置屬性,幾個配置名稱被重命名。
    • 客戶端配置:舊的名稱已被棄用,這就是爲什麼你看到這些警告。
    • 你提到了2.0.2,所以我想你正在使用新的框架YARN。在這種情況下,舊的服務器端配置都不會起作用。
  • 有兩種風格的mapreduce API--舊API(org.apache.hadoop.mapred)和新API(org.apache.hadoop.mapreduce)。這是一段悠久的歷史,但目前的狀態(以及未來)是支持舊的和新的API。
    • 舊API仍然穩定,並且在所有版本中都以二進制兼容方式支持。
    • 新的API在版本之間存在一些兼容性問題(1.x - > 2.x)。

您可以在Hadoop中2在這裏閱讀更多關於API的兼容性:http://hortonworks.com/blog/running-existing-applications-on-hadoop-2-yarn/