MR-Job

/*
The job submitter's view of the Job.
It allows the user to configure the job, submit it, control its execution, and query the state. The set methods only work until the job is submitted, afterwards they will throw an IllegalStateException.

Normally the user creates the application, describes various facets of the job via Job and then submits the job and monitor its progress.

Here is an example on how to submit a job:
*/

 // Create a new Job
 Job job = Job.getInstance();
 job.setJarByClass(MyJob.class);

 // Specify various job-specific parameters     
 job.setJobName("myjob");

 job.setInputPath(new Path("in"));
 job.setOutputPath(new Path("out"));

 job.setMapperClass(MyJob.MyMapper.class);
 job.setReducerClass(MyJob.MyReducer.class);

 // Submit the job, then poll for progress until the job is complete
 job.waitForCompletion(true);

功能:
1. 是一个作业提交的视图, 让提交者能够看清楚Job全貌.
2. 他允许提交者配置, 提交, 控制执行, 查询状态等操作.
3. set方法只是在作业提交前有效, 否则会报告”非法状态异常

思考:
一个作业需要用哪些方面的要素来描述?
一个作业包含那几个阶段?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值