List of usage examples for org.apache.hadoop.mapreduce Job killJob
public void killJob() throws IOException
From source file:edu.iu.daal_cov.COVDaalLauncher.java
License:Apache License
private void runCOV(Path inputDir, int mem, int numMapTasks, int numThreadsPerWorker, Path modelDir, Path outputDir, Configuration configuration) throws IOException, URISyntaxException, InterruptedException, ClassNotFoundException { System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println(/*from w w w . j av a 2 s. c o m*/ "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job covJob = configureCOVJob(inputDir, mem, numMapTasks, numThreadsPerWorker, modelDir, outputDir, configuration); boolean jobSuccess = covJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); // ---------------------------------------- if (!jobSuccess) { covJob.killJob(); System.out.println("COV Job failed"); } }
From source file:edu.iu.daal_cov.csrdistri.COVDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.// ww w . j a va 2 s .co m */ @Override public int run(String[] args) throws Exception { Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job covJob = init.createJob("CovJob", COVDaalLauncher.class, COVDaalCollectiveMapper.class); // finish job boolean jobSuccess = covJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); // ---------------------------------------- if (!jobSuccess) { covJob.killJob(); System.out.println("COV Job failed"); } return 0; }
From source file:edu.iu.daal_cov.densedistri.COVDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//w ww . j a va 2s.c o m */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job covJob = init.createJob("covJob", COVDaalLauncher.class, COVDaalCollectiveMapper.class); // finish job boolean jobSuccess = covJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { covJob.killJob(); System.out.println("covJob failed"); } return 0; }
From source file:edu.iu.daal_dforest.ClsDenseBatch.DFCLSDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./*from w w w . j av a 2 s. co m*/ */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.NUM_CLASS, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setInt(Constants.NUM_TREES, Integer.parseInt(args[init.getSysArgNum() + 3])); conf.setInt(Constants.MIN_OBS_LEAFNODE, Integer.parseInt(args[init.getSysArgNum() + 4])); conf.set(HarpDAALConstants.TEST_FILE_PATH, args[init.getSysArgNum() + 5]); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dfclsJob = init.createJob("dfclsJob", DFCLSDaalLauncher.class, DFCLSDaalCollectiveMapper.class); // finish job boolean jobSuccess = dfclsJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dfclsJob.killJob(); System.out.println("dfclsJob failed"); } return 0; }
From source file:edu.iu.daal_dforest.ClsTraverseDenseBatch.DFCLSTAVDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from w w w. j av a2s. c o m */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.NUM_CLASS, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setInt(Constants.NUM_TREES, Integer.parseInt(args[init.getSysArgNum() + 3])); conf.setInt(Constants.MIN_OBS_LEAFNODE, Integer.parseInt(args[init.getSysArgNum() + 4])); conf.setInt(Constants.MAX_TREE_DEPTH, Integer.parseInt(args[init.getSysArgNum() + 5])); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dfclstavJob = init.createJob("dfclstavJob", DFCLSTAVDaalLauncher.class, DFCLSTAVDaalCollectiveMapper.class); // finish job boolean jobSuccess = dfclstavJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dfclstavJob.killJob(); System.out.println("dfclstavJob failed"); } return 0; }
From source file:edu.iu.daal_dforest.RegDenseBatch.DFREGDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from ww w .j a v a2 s . c o m */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(Constants.NUM_TREES, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.set(HarpDAALConstants.TEST_FILE_PATH, args[init.getSysArgNum() + 3]); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dfregJob = init.createJob("dfregJob", DFREGDaalLauncher.class, DFREGDaalCollectiveMapper.class); // finish job boolean jobSuccess = dfregJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dfregJob.killJob(); System.out.println("dfregJob failed"); } return 0; }
From source file:edu.iu.daal_dforest.RegTraverseDenseBatch.DFREGTAVDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.// w w w . j av a 2s .co m */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(Constants.NUM_TREES, Integer.parseInt(args[init.getSysArgNum() + 2])); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dfregtavJob = init.createJob("dfregtavJob", DFREGTAVDaalLauncher.class, DFREGTAVDaalCollectiveMapper.class); // finish job boolean jobSuccess = dfregtavJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dfregtavJob.killJob(); System.out.println("dfregtavJob failed"); } return 0; }
From source file:edu.iu.daal_dtree.ClsDenseBatch.DTCLSDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./*w w w.j a va 2s . c om*/ */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.NUM_CLASS, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.set(HarpDAALConstants.TRAIN_PRUNE_PATH, args[init.getSysArgNum() + 3]); conf.set(HarpDAALConstants.TEST_FILE_PATH, args[init.getSysArgNum() + 4]); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dtclsJob = init.createJob("dtclsJob", DTCLSDaalLauncher.class, DTCLSDaalCollectiveMapper.class); // finish job boolean jobSuccess = dtclsJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dtclsJob.killJob(); System.out.println("dtclsJob failed"); } return 0; }
From source file:edu.iu.daal_dtree.ClsTraverseDenseBatch.DTCLSTAVDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./* w w w. ja v a2 s . c om*/ */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.NUM_CLASS, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.set(HarpDAALConstants.TRAIN_PRUNE_PATH, args[init.getSysArgNum() + 3]); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dtclstavJob = init.createJob("dtclstavJob", DTCLSTAVDaalLauncher.class, DTCLSTAVDaalCollectiveMapper.class); // finish job boolean jobSuccess = dtclstavJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dtclstavJob.killJob(); System.out.println("dtclstavJob failed"); } return 0; }
From source file:edu.iu.daal_dtree.RegDenseBatch.DTREGDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./*from w w w .j av a2 s . c o m*/ */ @Override public int run(String[] args) throws Exception { /* Put shared libraries into the distributed cache */ Configuration conf = this.getConf(); Initialize init = new Initialize(conf, args); /* Put shared libraries into the distributed cache */ init.loadDistributedLibs(); // load args init.loadSysArgs(); //load app args conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.set(HarpDAALConstants.TRAIN_PRUNE_PATH, args[init.getSysArgNum() + 2]); conf.set(HarpDAALConstants.TEST_FILE_PATH, args[init.getSysArgNum() + 3]); // launch job System.out.println("Starting Job"); long perJobSubmitTime = System.currentTimeMillis(); System.out.println( "Start Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); Job dtregJob = init.createJob("dtregJob", DTREGDaalLauncher.class, DTREGDaalCollectiveMapper.class); // finish job boolean jobSuccess = dtregJob.waitForCompletion(true); System.out.println( "End Job#" + " " + new SimpleDateFormat("HH:mm:ss.SSS").format(Calendar.getInstance().getTime())); System.out.println( "| Job#" + " Finished in " + (System.currentTimeMillis() - perJobSubmitTime) + " miliseconds |"); if (!jobSuccess) { dtregJob.killJob(); System.out.println("dtregJob failed"); } return 0; }