Beispiel #1
0
    void process() throws IOException {
      try {
        for (HRegionInfo[] regionsToMerge = next();
            regionsToMerge != null;
            regionsToMerge = next()) {
          if (!merge(regionsToMerge)) {
            return;
          }
        }
      } finally {
        try {
          hlog.closeAndDelete();

        } catch (IOException e) {
          LOG.error(e);
        }
      }
    }
 @After
 public void tearDown() throws IOException {
   IOException ex = null;
   try {
     region.close();
   } catch (IOException e) {
     LOG.warn("Caught Exception", e);
     ex = e;
   }
   try {
     hlog.closeAndDelete();
   } catch (IOException e) {
     LOG.warn("Caught Exception", e);
     ex = e;
   }
   if (ex != null) {
     throw ex;
   }
 }
 @After
 public void tearDown() throws Exception {
   HLog hlog = region.getLog();
   region.close();
   hlog.closeAndDelete();
 }