@Test public void testStopped() throws Exception { //shutdown hbase only. then check flag file. MiniHBaseCluster cluster = UTIL.getHBaseCluster(); LOG.info("shutdown hbase cluster..."); cluster.shutdown(); LOG.info("wait for the hbase cluster shutdown..."); cluster.waitUntilShutDown(); Configuration conf = UTIL.getConfiguration(); FileSystem fs = FileSystem.get(conf); Path resultFile = new Path(UTIL.getDataTestDirOnTestFS(), MASTER_FILE); assertTrue("Master flag file should have been created",fs.exists(resultFile)); resultFile = new Path(UTIL.getDataTestDirOnTestFS(), REGIONSERVER_FILE); assertTrue("RegionServer flag file should have been created",fs.exists(resultFile)); } }
@Test public void testStop() throws Exception { MiniHBaseCluster cluster = UTIL.getHBaseCluster(); LOG.info("shutdown hbase cluster..."); cluster.shutdown(); LOG.info("wait for the hbase cluster shutdown..."); cluster.waitUntilShutDown(); JMXConnector connector = JMXConnectorFactory.newJMXConnector( JMXListener.buildJMXServiceURL(connectorPort,connectorPort), null); expectedEx.expect(IOException.class); connector.connect(); }
cluster.stopMaster(0); cluster.shutdown(); cluster.waitUntilShutDown();
LOG.info("Shutting down cluster"); UTIL.getHBaseCluster().killAll(); UTIL.getHBaseCluster().waitUntilShutDown(); LOG.info("Starting cluster the second time"); UTIL.restartHBaseCluster(3, ports);
@Override public void stop() throws IOException { if (hbaseCluster != null) { hbaseCluster.shutdown(); this.hbaseCluster.killAll(); this.hbaseCluster.waitUntilShutDown(); logger.info("HBase Minicluster Service Shut Down."); this.hbaseCluster = null; } }
/** * Shutdown HBase mini cluster. Does not shutdown zk or dfs if running. */ public void shutdownMiniHBaseCluster() throws IOException { if (hbaseAdmin != null) { hbaseAdmin.close(); hbaseAdmin = null; } // unset the configuration for MIN and MAX RS to start conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, -1); conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, -1); if (this.hbaseCluster != null) { this.hbaseCluster.shutdown(); // Wait till hbase is down before going on to shutdown zk. this.hbaseCluster.waitUntilShutDown(); this.hbaseCluster = null; } }
public void stopHBaseCluster() throws IOException { if (hbaseCluster != null) { LOG.info("MiniHBaseCluster stopped"); hbaseCluster.shutdown(); hbaseCluster.waitUntilShutDown(); hbaseCluster = null; } }
@Override public void shutdown() { try { miniHBaseCluster.stopRegionServer(1); miniHBaseCluster.stopMaster(1); miniHBaseCluster.waitUntilShutDown(); //shutdown(); miniZooKeeperCluster.shutdown(); } catch (IOException e) { // Don't do anything. // e.printStackTrace(); } }
@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(); } }
@Test public void testStopped() throws Exception { //shutdown hbase only. then check flag file. MiniHBaseCluster cluster = UTIL.getHBaseCluster(); LOG.info("shutdown hbase cluster..."); cluster.shutdown(); LOG.info("wait for the hbase cluster shutdown..."); cluster.waitUntilShutDown(); Configuration conf = UTIL.getConfiguration(); FileSystem fs = FileSystem.get(conf); Path resultFile = new Path(UTIL.getDataTestDirOnTestFS(), MASTER_FILE); assertTrue("Master flag file should have been created",fs.exists(resultFile)); resultFile = new Path(UTIL.getDataTestDirOnTestFS(), REGIONSERVER_FILE); assertTrue("RegionServer flag file should have been created",fs.exists(resultFile)); } }
@Test public void testStop() throws Exception { MiniHBaseCluster cluster = UTIL.getHBaseCluster(); LOG.info("shutdown hbase cluster..."); cluster.shutdown(); LOG.info("wait for the hbase cluster shutdown..."); cluster.waitUntilShutDown(); JMXConnector connector = JMXConnectorFactory.newJMXConnector( JMXListener.buildJMXServiceURL(connectorPort,connectorPort), null); expectedEx.expect(IOException.class); connector.connect(); }
cluster.stopMaster(0); cluster.shutdown(); cluster.waitUntilShutDown();