Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.MiniMRCluster.shutdown()


      LOG.info("After map/reduce completion");

      // verify map-reduce results
      verify(Bytes.toString(table.getTableName()));
    } finally {
      mrCluster.shutdown();
      if (jobConf != null) {
        FileUtil.fullyDelete(new File(jobConf.get("hadoop.tmp.dir")));
      }
    }
  }
View Full Code Here


      LOG.info("After map/reduce completion");

      // verify map-reduce results
      verify(Bytes.toString(table.getTableName()));
    } finally {
      mrCluster.shutdown();
      if (job != null) {
        FileUtil.fullyDelete(
          new File(job.getConfiguration().get("hadoop.tmp.dir")));
      }
    }
View Full Code Here

      job.waitForCompletion(true);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } finally {
      mrCluster.shutdown();
      if (job != null) {
        FileUtil.fullyDelete(
          new File(job.getConfiguration().get("hadoop.tmp.dir")));
      }
    }
View Full Code Here

        }
        assertEquals(cacheString + "\t", line);
        assertEquals(cacheString2 + "\t", line2);
      } finally{
        if (dfs != null) { dfs.shutdown(); }
        if (mr != null) { mr.shutdown();}
      }
     
    } catch(Exception e) {
      failTrace(e);
    }
View Full Code Here

  public void testMiniMRJobRunner() throws Exception {
    MiniMRCluster m = new MiniMRCluster(1, "file:///", 1);
    try {
      testWithConf(m.createJobConf());
    } finally {
      m.shutdown();
    }

  }

  private Path createTempFile(String filename, String contents)
View Full Code Here

  public void testMiniMRJobRunner() throws Exception {
    MiniMRCluster m = new MiniMRCluster(1, "file:///", 1);
    try {
      testWithConf(m.createJobConf());
    } finally {
      m.shutdown();
    }

  }

  private Path createTempFile(String filename, String contents)
View Full Code Here

      logs = fs.listStatus(new Path(namenode+"/logs"));
      assertTrue("Unexpected map count, logs.length=" + logs.length,
          logs.length == 2);
    } finally {
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown(); }
    }
  }

  public void testLimits() throws Exception {
    Configuration conf = new Configuration();
View Full Code Here

        System.out.println(eventString);
        seenEvents.add(eventString);
      }
    } finally {
      // stop the MR cluster
      mrCluster.shutdown();
     
      if (ris != null) {
          ris.close();
      }
      if (parser != null) {
View Full Code Here

    try {
      mr = new MiniMRCluster(2, "file:///", 3);
      Configuration conf = mr.createJobConf();
      runWordCount(conf);
    } finally {
      if (mr != null) { mr.shutdown(); }
    }
  }

  public static class TrackingTextInputFormat extends TextInputFormat {
View Full Code Here

      assertTrue(fileList.length == numMappers);

    } finally {
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown();
      }
    }
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.