  复制public class MyApp extends Configured implements Tool {               public int run(String[] args) throws Exception {               // 即将被ToolRunner执行的用类Configuration               Configuration conf = getConf();               // 使用conf建立JobConf               JobConf job = new JobConf(conf, MyApp.class);               // 执行客户端参数               Path in = new Path(args[1]);               Path out = new Path(args[2]);               // 指定job相关的IT技术网参数                    job.setJobName("my-app");               job.setInputPath(in);               job.setOutputPath(out);               job.setMapperClass(MyApp.MyMapper.class);               job.setReducerClass(MyApp.MyReducer.class);               *               // 提交job,网站模板然后监视进度直到job完成               JobClient.runJob(job);   }                public static void main(String[] args) throws Exception {               // 让ToolRunner 处理命令行参数                int res = ToolRunner.run(new Configuration(),用类 new Sort(), //这里封装了GenericOptionsParser解析args               System.exit(res);   }               }               1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.服务器租用 |