mapreduce输出如何指定分隔符?
Configuration config = HBaseConfiguration.create();
config.set("mapred.textoutputformat.ignoreseparator","true");
config.set("mapred.textoutputformat.separator",";");
mapreduce多job并行?
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob;
import org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl;
//总控制器
JobControl jobControl = new JobControl("tele");
//第一个job
ControlledJob cjb1 = new ControlledJob(job.getConfiguration());
jobControl.addJob(cjb1);
//第二个job
ControlledJob cjb2 = new ControlledJob(callerTimeJob.getConfiguration());
jobControl.addJob(cjb2);
//开启线程执行jobControl
Thread jcThread = new Thread(jobControl);
jcThread.start();
//等待所有job完成
while (true) {
//当job池里所有的job完成后,执行 下一步操作
if (jobControl.allFinished()) {
System.out.println(jobControl.getSuccessfulJobList());
jobControl.stop();
break;
}
//获取执行失败的job列表
if (jobControl.getFailedJobList().size() > 0) {
System.out.println(jobControl.getFailedJobList());
jobControl.stop();
break;
}
}
reduce结果如何输出到mysql?
Job如何定时执行?