List of usage examples for org.apache.hadoop.conf Configuration setDouble
public void setDouble(String name, double value)
name
property to a double
. From source file:edu.iu.daal_kernel_func.RbfDenseBatch.RbfDenseDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./*from ww w .j a v a 2 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.setDouble(Constants.SIGMA, Double.parseDouble(args[init.getSysArgNum() + 2])); conf.set(Constants.RIGHT_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 kernelRbfJob = init.createJob("kernelRbfJob", RbfDenseDaalLauncher.class, RbfDenseDaalCollectiveMapper.class); // finish job boolean jobSuccess = kernelRbfJob.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) { kernelRbfJob.killJob(); System.out.println("kernelRbfJob failed"); } return 0; }
From source file:edu.iu.daal_logitboost.LOGITBOOSTDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from w ww . ja va 2 s .com */ @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(HarpDAALConstants.MAX_ITERATIONS, Integer.parseInt(args[init.getSysArgNum() + 3])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(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 logitboostJob = init.createJob("logitboostJob", LOGITBOOSTDaalLauncher.class, LOGITBOOSTDaalCollectiveMapper.class); // finish job boolean jobSuccess = logitboostJob.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) { logitboostJob.killJob(); System.out.println("logitboostJob failed"); } return 0; }
From source file:edu.iu.daal_normalization.MinMaxDenseBatch.MinMaxDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.// w ww . java 2 s . com */ @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.setDouble(Constants.UPPER_BOUND, Double.parseDouble(args[init.getSysArgNum() + 1])); conf.setDouble(Constants.LOWER_BOUND, Double.parseDouble(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 minmaxJob = init.createJob("minmaxJob", MinMaxDaalLauncher.class, MinMaxDaalCollectiveMapper.class); // finish job boolean jobSuccess = minmaxJob.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) { minmaxJob.killJob(); System.out.println("minmaxJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.AdaGradient.ADAGDDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./* w w w .j av a 2 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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.BATCH_SIZE, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(args[init.getSysArgNum() + 3])); conf.setDouble(HarpDAALConstants.LEARNING_RATE, Double.parseDouble(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 adagdJob = init.createJob("adagdJob", ADAGDDaalLauncher.class, ADAGDDaalCollectiveMapper.class); // finish job boolean jobSuccess = adagdJob.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) { adagdJob.killJob(); System.out.println("adagdJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.AdaGradientOpt.ADAGDOptDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order./* ww w . j a v 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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.BATCH_SIZE, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(args[init.getSysArgNum() + 3])); conf.setDouble(HarpDAALConstants.LEARNING_RATE, Double.parseDouble(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 adagdoptJob = init.createJob("adagdoptJob", ADAGDOptDaalLauncher.class, ADAGDOptDaalCollectiveMapper.class); // finish job boolean jobSuccess = adagdoptJob.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) { adagdoptJob.killJob(); System.out.println("adagdoptJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.LBFGSDenseBatch.LBFGSDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//w w w .ja v 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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setDouble(HarpDAALConstants.STEP_LENGTH, Double.parseDouble(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 lbfgsJob = init.createJob("lbfgsJob", LBFGSDaalLauncher.class, LBFGSDaalCollectiveMapper.class); // finish job boolean jobSuccess = lbfgsJob.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) { lbfgsJob.killJob(); System.out.println("lbfgsJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.LBFGSOptDenseBatch.LBFGSOptDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from w w w . jav a 2s. com */ @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])); conf.setDouble(HarpDAALConstants.STEP_LENGTH, Double.parseDouble(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 lbfgsOptJob = init.createJob("lbfgsOptJob", LBFGSOptDaalLauncher.class, LBFGSOptDaalCollectiveMapper.class); // finish job boolean jobSuccess = lbfgsOptJob.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) { lbfgsOptJob.killJob(); System.out.println("lbfgsOptJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.SGDDenseBatch.SGDDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from www . j av a 2 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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(args[init.getSysArgNum() + 2])); conf.setDouble(HarpDAALConstants.LEARNING_RATE, Double.parseDouble(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 sgdJob = init.createJob("sgdJob", SGDDaalLauncher.class, SGDDaalCollectiveMapper.class); // finish job boolean jobSuccess = sgdJob.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) { sgdJob.killJob(); System.out.println("sgdJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.SGDMiniDenseBatch.SGDMINIDaalLauncher.java
License:Apache License
/** * Launches all the tasks in order.//from ww w .j a v a 2 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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.BATCH_SIZE, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(args[init.getSysArgNum() + 3])); conf.setDouble(HarpDAALConstants.LEARNING_RATE, Double.parseDouble(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 sgdminiJob = init.createJob("sgdminiJob", SGDMINIDaalLauncher.class, SGDMINIDaalCollectiveMapper.class); // finish job boolean jobSuccess = sgdminiJob.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) { sgdminiJob.killJob(); System.out.println("sgdminiJob failed"); } return 0; }
From source file:edu.iu.daal_optimization_solvers.SGDMomentDenseBatch.SGDMOMDaalLauncher.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(); conf.setInt(HarpDAALConstants.FILE_DIM, Integer.parseInt(args[init.getSysArgNum()])); conf.setInt(HarpDAALConstants.FEATURE_DIM, Integer.parseInt(args[init.getSysArgNum() + 1])); conf.setInt(HarpDAALConstants.BATCH_SIZE, Integer.parseInt(args[init.getSysArgNum() + 2])); conf.setDouble(HarpDAALConstants.ACC_THRESHOLD, Double.parseDouble(args[init.getSysArgNum() + 3])); conf.setDouble(HarpDAALConstants.LEARNING_RATE, Double.parseDouble(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 sgdmomJob = init.createJob("sgdmomJob", SGDMOMDaalLauncher.class, SGDMOMDaalCollectiveMapper.class); // finish job boolean jobSuccess = sgdmomJob.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) { sgdmomJob.killJob(); System.out.println("sgdmomJob failed"); } return 0; }