org.apache.hadoop.mapred.MapRunnable Java Examples
The following examples show how to use
org.apache.hadoop.mapred.MapRunnable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MapProcessor.java From incubator-tez with Apache License 2.0 | 5 votes |
void runOldMapper( final JobConf job, final MRTaskReporter reporter, final MRInputLegacy input, final KeyValueWriter output ) throws IOException, InterruptedException { // Initialize input in-line since it sets parameters which may be used by the processor. // Done only for MRInput. // TODO use new method in MRInput to get required info //input.initialize(job, master); InputSplit inputSplit = input.getOldInputSplit(); updateJobWithSplit(job, inputSplit); RecordReader in = new OldRecordReader(input); OutputCollector collector = new OldOutputCollector(output); MapRunnable runner = (MapRunnable)ReflectionUtils.newInstance(job.getMapRunnerClass(), job); runner.run(in, collector, (Reporter)reporter); // Set progress to 1.0f if there was no exception, reporter.setProgress(1.0f); // start the sort phase only if there are reducers this.statusUpdate(); }
Example #2
Source File: MapProcessor.java From tez with Apache License 2.0 | 5 votes |
void runOldMapper( final JobConf job, final MRTaskReporter reporter, final MRInputLegacy input, final KeyValueWriter output ) throws IOException, InterruptedException { // Initialize input in-line since it sets parameters which may be used by the processor. // Done only for MRInput. // TODO use new method in MRInput to get required info //input.initialize(job, master); InputSplit inputSplit = input.getOldInputSplit(); updateJobWithSplit(job, inputSplit); RecordReader in = new OldRecordReader(input); OutputCollector collector = new OldOutputCollector(output); MapRunnable runner = (MapRunnable)ReflectionUtils.newInstance(job.getMapRunnerClass(), job); runner.run(in, collector, (Reporter)reporter); // Set progress to 1.0f if there was no exception, reporter.setProgress(1.0f); // start the sort phase only if there are reducers this.statusUpdate(); }