jobconf和工作之间的基本区别是什么? [英] what is the basic difference between jobconf and job?
问题描述
我想知道jobconf和工作对象之间的基本区别,目前我正在提交我的工作。
JobClient .runJob(jobconf);
我看到了另外一种提交这种工作的方式
配置conf = getConf();
工作作业=新作业(conf,二次排序);
job.waitForCompletion(true);
返回0;
以及如何使用jobconf指定作业的sortcomparator类?
可以任何一个给我解释这个概念吗?
总之: JobConf
和 org.apache.hadoop.mapred
包中的所有内容都是用于编写hadoop作业的旧API的一部分, Job
,并且 org.apache.hadoop.mapreduce
包中的所有内容都是用于编写hadoop作业的新的首选API的一部分。这两个API通常提供等效的核心功能。
如果您刚接触hadoop,只需开始使用新API(即 Job
和配置
而不是 JobConf
)。确保不要从 mapred
包中导入任何内容。当您在互联网上使用旧API查找示例时,您可以使用此演示文稿 a>或本指南将其转换为新的API 。
hi i wanted to know the basic difference between jobconf and job objects,currently i am submitting my job like this
JobClient.runJob(jobconf);
i saw other way of submitting jobs like this
Configuration conf = getConf();
Job job = new Job(conf, "secondary sort");
job.waitForCompletion(true);
return 0;
and how can i specify the sortcomparator class for the job using jobconf?
can any one explain me this concept?
In short: JobConf
and everything else in the org.apache.hadoop.mapred
package is part of the old API used to write hadoop jobs, Job
and everything in the org.apache.hadoop.mapreduce
package is part of the new and preferred API to write hadoop jobs. Both APIs generally provide equivalent core functionality.
If you're new to hadoop just start using the new API (i.e. Job
and Configuration
instead of JobConf
). Make sure to not import anything from the mapred
package. When you find examples on the internet using the old API you can use this presentation or this guide to translate it to the new API.
这篇关于jobconf和工作之间的基本区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!