List of usage examples for org.apache.hadoop.mapred MiniMRCluster MiniMRCluster
public MiniMRCluster(int jobTrackerPort, int taskTrackerPort, int numTaskTrackers, String namenode, int numDir, String[] racks, String[] hosts) throws IOException
From source file:org.lilyproject.testfw.HadoopLauncher.java
License:Apache License
public void startMiniMapReduceCluster() throws IOException { System.out.println("Starting mini mapreduce cluster..."); // These are needed for the new and improved Map/Reduce framework System.setProperty("hadoop.log.dir", new File(baseTempDir, "hadooplogs").getAbsolutePath()); conf.set("mapred.output.dir", new File(baseTempDir, "mapred").getAbsolutePath()); mrCluster = new MiniMRCluster(9001, 0, 1, FileSystem.get(conf).getUri().toString(), 1, null, new String[] { "localhost" }); System.out.println("Mini mapreduce cluster started"); conf.set("mapred.job.tracker", mrCluster.createJobConf().get("mapred.job.tracker")); }