Я пишу программы для хаопов, и я действительно не хочу играть с устаревшими классами. В любом месте в Интернете я не могу найти программы с обновленными
org.apache.hadoop.conf.Configuration
класс insted of
org.apache.hadoop.mapred.JobConf
класс.
public static void main(String[] args) throws Exception {
JobConf conf = new JobConf(Test.class);
conf.setJobName("TESST");
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(IntWritable.class);
conf.setMapperClass(Map.class);
conf.setCombinerClass(Reduce.class);
conf.setReducerClass(Reduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.setInputPaths(conf, new Path(args[0]));
FileOutputFormat.setOutputPath(conf, new Path(args[1]));
JobClient.runJob(conf);
}
Вот как выглядит мой main(). Может понравиться, кто-нибудь предоставит мне обновленную функцию.