hadoop job 启动
“”"
// public static void main(String[] args) throws Exception {
// String input = “hdfs://centos:9000/access.log.10”;
// String output = “hdfs://centos:9000/out_kpibrowser”;
//
// JobConf conf = new JobConf(KPIBrowser.class);
// conf.setJobName(“KPIBrowser”);
conf.addResource(“classpath:/hadoop/core-site.xml”);
conf.addResource(“classpath:/hadoop/hdfs-site.xml”);
conf.addResource(“classpath:/hadoop/mapred-site.xml”);
//
// conf.setOutputKeyClass(Text.class);
// conf.setOutputValueClass(IntWritable.class);
//
// conf.setMapperClass(KPIBrowserMapper.class);
// conf.setCombinerClass(KPIBrowserReducer.class);
// conf.setReducerClass(KPIBrowserReducer.class);
//
// conf.setInputFormat(TextInputFormat.class);
// conf.setOutputFormat(TextOutputFormat.class);
//
// FileInputFormat.setInputPaths(conf, new Path(input));
// FileOutputFormat.setOutputPath(conf, new Path(output));
// //启动任务
// JobClient.runJob(conf);
// System.exit(0);
“”"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)