我正在编写hadoop程序,我真的不想玩弃用的类.在线任何地方我无法找到更新的程序
org.apache.hadoop.conf.Configuration
上课
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);
}
Run Code Online (Sandbox Code Playgroud)
这就是我的main()的样子.可以请任何人都提供更新的功能.
使用Streamer jar运行hadoop程序与使用程序的jar文件运行hadoop程序有什么区别?