List of usage examples for org.apache.hadoop.mapred MiniMRCluster shutdown
public void shutdown()
From source file:JaqlShell.java
License:Apache License
/** * @param mrc//from ww w . j ava 2 s. c om * @throws Exception */ private static void stopMRCluster(MiniMRCluster mrc) throws Exception { mrc.shutdown(); // clean up the temp conf dir cleanupOverride(); }
From source file:com.hadoop.mapreduce.TestLzoLazyLoading.java
License:Open Source License
public void testWithLocal() throws Exception { MiniMRCluster mr = null; try {/*from w w w . j a v a2 s .co m*/ JobConf jconf = new JobConf(); jconf.set("mapred.queue.names", "default"); mr = new MiniMRCluster(2, "file:///", 3, null, null, jconf); Configuration cf = mr.createJobConf(); cf.set("io.compression.codecs", LzoCodec.class.getName()); runWordCount(cf, false, false); runWordCount(cf, false, true); runWordCount(cf, true, false); } finally { if (mr != null) { mr.shutdown(); } } }
From source file:org.apache.ambari.servicemonitor.utils.DFSUtils.java
License:Apache License
public static MiniMRCluster destroyMRCluster(MiniMRCluster mrCluster) { if (mrCluster != null) { try {/*w w w . j av a 2s .c o m*/ mrCluster.shutdown(); } catch (Exception e) { LOG.warn("Exception when destroying cluster: " + e, e); } } return null; }