@Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { log.info("TASK: MapReduce Algorithm Task - " + jobConf.getMapReduceClass()); newTableProcess(jobConf.getHdfsPath(), jobConf.getResultPath()); importDataProcess(); return RepeatStatus.FINISHED; }
private void importDataProcess() throws ClassNotFoundException, IOException { mapReduceDAO.setHdfsSource(jobConf.getHdfsPath().getHdfsSource()); JobConf conf = mapReduceDAO.createJobConf(jobConf.getMapReduceClazz()); conf.setOutputKeyClass(jobConf.getOutputKeyClazz()); conf.setOutputValueClass(jobConf.getOutputValueClazz()); conf.setMapperClass(jobConf.getMapperClazz()); conf.setReducerClass(jobConf.getReducerClazz()); mapReduceDAO.setInputPath(jobConf.getHdfsPath().getStorePath()); mapReduceDAO.setOutputPath(jobConf.getResultPath()); mapReduceDAO.exec(); }