List of usage examples for org.apache.hadoop.mapred MiniMRCluster MiniMRCluster
public MiniMRCluster(int jobTrackerPort, int taskTrackerPort, int numTaskTrackers, String namenode, int numDir) throws IOException
From source file:com.dasasian.chok.testutil.integration.HadoopMiniCluster.java
License:Apache License
public void start() throws IOException { LOG.info("starting hadoop cluster..."); Configuration conf = new Configuration(); System.setProperty("test.build.data", "build"); System.setProperty("hadoop.log.dir", "build/logs"); _dfsCluster = new MiniDFSCluster(_namenodePort, conf, _datanodeCount, true, true, StartupOption.REGULAR, null);//from www.ja v a 2 s .c o m LOG.info("started namnode on " + conf.get(IHadoopConstants.NAMENODE)); _mrCluster = new MiniMRCluster(_jobtrackerPort, 0, _tasktrackerCount, conf.get(IHadoopConstants.NAMENODE), 1); LOG.info("started jobtracker on " + _mrCluster.createJobConf().get(IHadoopConstants.JOBTRACKER)); }