This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void map(InputKey key, InputValue value, | |
OutputCollector<OutputKey, OutputValue> output, Reporter reporter) | |
throws IOException { | |
BECOMES | |
@Override | |
public void map(InputKey key, InputValue value, | |
Mapper<InputKey, InputValue, OutputKey, OutputValue>.Context context) | |
throws IOException, InterruptedException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reporter.incrCounter(family, type, 1); | |
BECOMES | |
context.getCounter(family, type).increment(1); | |
output.collect(key, value); | |
BECOMES | |
context.write(key, value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void close() throws IOException { | |
BECOMES | |
@Override | |
public void cleanup(Context context) throws IOException, InterruptedException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Overide | |
public void configure(JobConf job) { | |
super.configure(job); | |
config = job; | |
BECOMES | |
@Override | |
public void setup(Mapper<InputKey, InputValue, OutputKey, OutputValue>.Context context) | |
throws InterruptedException, IOException { | |
super.setup(context); | |
config = context.getConfiguration(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String application_value = job.get("app.value"); | |
BECOMES | |
String application_value = config.get("app.value"); | |
Path[] localArchives = DistributedCache.getLocalCacheArchives(job); | |
BECOMES | |
Path[] localArchives = DistributedCache.getLocalCacheArchives(config); | |
Class handlerClass = job.getClass(handlerName, SomeProcessor.class); | |
BECOMES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JobConf job = new JobConf(getConf()); | |
BECOMES | |
Job job = new Job(getConf()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job.setInputFormat(SequenceFileInputFormat.class); | |
job.setOutputFormat(SequenceFileOutputFormat.class); | |
BECOMES | |
job.setInputFormatClass(SequenceFileInputFormat.class); | |
job.setOutputFormatClass(SequenceFileOutputFormat.class); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DistributedCache.addCacheArchive(new URI(path), job); | |
BECOMES | |
DistributedCache.addCacheArchive(new URI(path), job.getConfiguration()); | |
job.set("some_property", property_value); | |
BECOMES | |
job.getConfiguration().set("some_property", property_value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JobClient.runJob(job); | |
BECOMES | |
job.waitForCompletion(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependsOn(':test-testng') | |
apply plugin: 'java' | |
apply plugin: 'maven' | |
apply plugin: 'eclipse' |