public static void waitForTableToBeOnline(final HBaseTestingUtility util, final TableName tableName) throws IOException, InterruptedException { HRegionServer rs = util.getRSForFirstRegionInTable(tableName); List<HRegion> onlineRegions = rs.getRegions(tableName); for (HRegion region : onlineRegions) { region.waitForFlushesAndCompactions(); } // Wait up to 60 seconds for a table to be available. util.waitFor(60000, util.predicateTableAvailable(tableName)); }
LOG.debug("Closing {}, disabling compactions & flushes", this.getRegionInfo().getEncodedName()); waitForFlushesAndCompactions();
/** * delete the row, family and cell to create the del file */ private void createDelFile(Table table, TableName tableName, byte[] family, byte[] qf) throws IOException, InterruptedException { for (byte k0 : KEYS) { byte[] k = new byte[] { k0 }; // delete a family byte[] key1 = Bytes.add(k, Bytes.toBytes(0)); Delete delete1 = new Delete(key1); delete1.addFamily(family); table.delete(delete1); // delete one row byte[] key2 = Bytes.add(k, Bytes.toBytes(2)); Delete delete2 = new Delete(key2); table.delete(delete2); // delete one cell byte[] key3 = Bytes.add(k, Bytes.toBytes(4)); Delete delete3 = new Delete(key3); delete3.addColumn(family, qf); table.delete(delete3); } admin.flush(tableName); List<HRegion> regions = TEST_UTIL.getHBaseCluster().getRegions(tableName); for (HRegion region : regions) { region.waitForFlushesAndCompactions(); region.compact(true); } } /**
region.waitForFlushesAndCompactions(); // enable can trigger a compaction, wait for it.
wasFlushing = writestate.flushing; LOG.debug("Closing " + this + ": disabling compactions & flushes"); waitForFlushesAndCompactions();
public static void waitForTableToBeOnline(final HBaseTestingUtility util, final TableName tableName) throws IOException, InterruptedException { HRegionServer rs = util.getRSForFirstRegionInTable(tableName); List<HRegion> onlineRegions = rs.getRegions(tableName); for (HRegion region : onlineRegions) { region.waitForFlushesAndCompactions(); } // Wait up to 60 seconds for a table to be available. util.waitFor(60000, util.predicateTableAvailable(tableName)); }
meta.waitForFlushesAndCompactions(); meta.close(); walFactory.close();
/** * delete the row, family and cell to create the del file */ private void createDelFile(Table table, TableName tableName, byte[] family, byte[] qf) throws IOException, InterruptedException { for (byte k0 : KEYS) { byte[] k = new byte[] { k0 }; // delete a family byte[] key1 = Bytes.add(k, Bytes.toBytes(0)); Delete delete1 = new Delete(key1); delete1.addFamily(family); table.delete(delete1); // delete one row byte[] key2 = Bytes.add(k, Bytes.toBytes(2)); Delete delete2 = new Delete(key2); table.delete(delete2); // delete one cell byte[] key3 = Bytes.add(k, Bytes.toBytes(4)); Delete delete3 = new Delete(key3); delete3.addColumn(family, qf); table.delete(delete3); } admin.flush(tableName); List<HRegion> regions = TEST_UTIL.getHBaseCluster().getRegions(tableName); for (HRegion region : regions) { region.waitForFlushesAndCompactions(); region.compact(true); } } /**
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); region.waitForFlushesAndCompactions();
region.waitForFlushesAndCompactions(); // enable can trigger a compaction, wait for it.