我对 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 包。
我编辑了我的问题以包含我在输出中已弃用的内容
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