/** * Flushes all caches in the mini hbase cluster * @throws IOException */ public void flush() throws IOException { getMiniHBaseCluster().flushcache(); }
@Override public void flushcache() throws IOException { UTIL.getMiniHBaseCluster().flushcache(); } });
/** * Flushes all caches in the mini hbase cluster * @throws IOException */ public void flush(TableName tableName) throws IOException { getMiniHBaseCluster().flushcache(tableName); }
@Override public void flushcache() throws IOException { UTIL.getHBaseCluster().flushcache(); } });
getMiniHBaseCluster().flushcache(TableName.META_TABLE_NAME); mutator.flush(); if (hbaseCluster != null) { getMiniHBaseCluster().flushcache(table.getName());
/** * Test that a regionserver is able to abort properly, even when a coprocessor * throws an exception in preStopRegionServer(). */ @Test public void testAbortFromRPC() throws Exception { TableName tableName = TableName.valueOf("testAbortFromRPC"); // create a test table Table table = testUtil.createTable(tableName, FAMILY_BYTES); // write some edits testUtil.loadTable(table, FAMILY_BYTES); LOG.info("Wrote data"); // force a flush cluster.flushcache(tableName); LOG.info("Flushed table"); // Send a poisoned put to trigger the abort Put put = new Put(new byte[]{0, 0, 0, 0}); put.addColumn(FAMILY_BYTES, Bytes.toBytes("c"), new byte[]{}); put.setAttribute(StopBlockingRegionObserver.DO_ABORT, new byte[]{1}); List<HRegion> regions = cluster.findRegionsForTable(tableName); HRegion firstRegion = cluster.findRegionsForTable(tableName).get(0); table.put(put); // Verify that the regionserver is stopped assertNotNull(firstRegion); assertNotNull(firstRegion.getRegionServerServices()); LOG.info("isAborted = " + firstRegion.getRegionServerServices().isAborted()); assertTrue(firstRegion.getRegionServerServices().isAborted()); LOG.info("isStopped = " + firstRegion.getRegionServerServices().isStopped()); assertTrue(firstRegion.getRegionServerServices().isStopped()); }
/** * Flushes all caches in the mini hbase cluster */ public void flush() throws IOException { getMiniHBaseCluster().flushcache(); }
/** * Flushes all caches in the mini hbase cluster */ public void flush(byte[] tableName) throws IOException { getMiniHBaseCluster().flushcache(tableName); }
/** * Flushes all caches in the mini hbase cluster * @throws IOException */ public void flush(TableName tableName) throws IOException { getMiniHBaseCluster().flushcache(tableName); }
/** * Flushes all caches in the mini hbase cluster * @throws IOException */ public void flush() throws IOException { getMiniHBaseCluster().flushcache(); }
@Override public void flushcache() throws IOException { UTIL.getHBaseCluster().flushcache(); } });
@Override public void flushcache() throws IOException { UTIL.getMiniHBaseCluster().flushcache(); } });
numRegions); if (hbaseCluster != null) { getMiniHBaseCluster().flushcache(HConstants.META_TABLE_NAME); table.flushCommits(); if (hbaseCluster != null) { getMiniHBaseCluster().flushcache(tableNameBytes);
@Override public void stop(boolean cleanUp) throws Exception { LOG.info("HBASE: Stopping MiniHBaseCluster"); if (isRestActivated()) { getHbaseRestLocalCluster().cleanUp(); getHbaseRestLocalCluster().stop(); } miniHBaseCluster.flushcache(); miniHBaseCluster.close(); miniHBaseCluster.shutdown(); miniHBaseCluster.waitUntilShutDown(); if (cleanUp) { cleanUp(); } }
getMiniHBaseCluster().flushcache(TableName.META_TABLE_NAME); mutator.flush(); if (hbaseCluster != null) { getMiniHBaseCluster().flushcache(table.getName());
/** * Test that a regionserver is able to abort properly, even when a coprocessor * throws an exception in preStopRegionServer(). */ @Test public void testAbortFromRPC() throws Exception { TableName tableName = TableName.valueOf("testAbortFromRPC"); // create a test table Table table = testUtil.createTable(tableName, FAMILY_BYTES); // write some edits testUtil.loadTable(table, FAMILY_BYTES); LOG.info("Wrote data"); // force a flush cluster.flushcache(tableName); LOG.info("Flushed table"); // Send a poisoned put to trigger the abort Put put = new Put(new byte[]{0, 0, 0, 0}); put.addColumn(FAMILY_BYTES, Bytes.toBytes("c"), new byte[]{}); put.setAttribute(StopBlockingRegionObserver.DO_ABORT, new byte[]{1}); List<HRegion> regions = cluster.findRegionsForTable(tableName); HRegion firstRegion = cluster.findRegionsForTable(tableName).get(0); table.put(put); // Verify that the regionserver is stopped assertNotNull(firstRegion); assertNotNull(firstRegion.getRegionServerServices()); LOG.info("isAborted = " + firstRegion.getRegionServerServices().isAborted()); assertTrue(firstRegion.getRegionServerServices().isAborted()); LOG.info("isStopped = " + firstRegion.getRegionServerServices().isStopped()); assertTrue(firstRegion.getRegionServerServices().isStopped()); }