jobconf 和 job 之间的基本区别是什么? [英] what is the basic difference between jobconf and job?

查看:20
本文介绍了jobconf 和 job 之间的基本区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道jobconf和job对象之间的基本区别,目前我正在提交我的工作

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;

如何使用 jobconf 为作业指定 sortcomparator 类?

and how can i specify the sortcomparator class for the job using jobconf?

谁能解释一下这个概念?

can any one explain me this concept?

推荐答案

简而言之:JobConforg.apache.hadoop.mapred 包中的所有其他内容都是一部分在用于编写 hadoop 作业的旧 API 中,Joborg.apache.hadoop.mapreduce 包中的所有内容都是用于编写 hadoop 作业的新的首选 API 的一部分.两种 API 通常都提供等效的核心功能.

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.

如果您不熟悉 hadoop,只需开始使用新的 API(即 JobConfiguration 而不是 JobConf).确保不要从 mapred 包中导入任何内容.当您在互联网上找到使用旧 API 的示例时,您可以使用 此演示文稿本指南 将其翻译成新的 API.

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 和 job 之间的基本区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆