mapreduce输出如何指定分隔符?

  1. Configuration config = HBaseConfiguration.create();
  2. config.set("mapred.textoutputformat.ignoreseparator","true");
  3. config.set("mapred.textoutputformat.separator",";");

mapreduce多job并行?

  1. import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob;
  2. import org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl;
  3. //总控制器
  4. JobControl jobControl = new JobControl("tele");
  5. //第一个job
  6. ControlledJob cjb1 = new ControlledJob(job.getConfiguration());
  7. jobControl.addJob(cjb1);
  8. //第二个job
  9. ControlledJob cjb2 = new ControlledJob(callerTimeJob.getConfiguration());
  10. jobControl.addJob(cjb2);
  11. //开启线程执行jobControl
  12. Thread jcThread = new Thread(jobControl);
  13. jcThread.start();
  14. //等待所有job完成
  15. while (true) {
  16. //当job池里所有的job完成后,执行 下一步操作
  17. if (jobControl.allFinished()) {
  18. System.out.println(jobControl.getSuccessfulJobList());
  19. jobControl.stop();
  20. break;
  21. }
  22. //获取执行失败的job列表
  23. if (jobControl.getFailedJobList().size() > 0) {
  24. System.out.println(jobControl.getFailedJobList());
  25. jobControl.stop();
  26. break;
  27. }
  28. }

reduce结果如何输出到mysql?

Job如何定时执行?