/*
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方法只是在作业提交前有效, 否则会报告”非法状态异常”
思考:
一个作业需要用哪些方面的要素来描述?
一个作业包含那几个阶段?