public String execute() { if (HadoopUtil.getConf() == null) { setInfo("集群配置错误或者未初始化,请先配置集群!!!"); log.info("集群配置错误或者未初始化,请先配置集群!!!"); return SUCCESS; } boolean flag = HadoopIOUtil.uploadToHdfs(localPath, hdfsPath); if (!flag) { setInfo("上传文件" + hdfsPath.toString() + "失败!!!"); log.info("上传文件" + hdfsPath.toString() + "失败!!!"); } setInfo("上传文件到" + hdfsPath + "成功!!!"); return SUCCESS; }
public String execute() { if (HadoopUtil.getConf() == null) { setInfo("集群配置错误或者未初始化,请先配置集群!!!"); log.info("集群配置错误或者未初始化,请先配置集群!!!"); return "initial"; } CanopyDriverRunnable canopyDriver = new CanopyDriverRunnable( input, output, distanceMeasure, t1, t2, clustering, method, splitter); MonitorUtil.monitorJobs = null; new Thread(canopyDriver).start(); if ("true".equals(clustering)) { jobNums = 3; } else { jobNums = 2; } return SUCCESS; }