Package org.apache.bookkeeper.proto

Examples of org.apache.bookkeeper.proto.BookieServer.shutdown()


    public void tearDownOneBookieServer() throws Exception {
        Random r = new Random();
        int bi = r.nextInt(bookiesList.size());
        BookieServer bs = bookiesList.get(bi);
        try {
            bs.shutdown();
        } catch (InterruptedException e) {
            LOG.error("Error tearing down", e);
        }
        bookiesList.remove(bi);
    }
View Full Code Here


            Thread.sleep(3000);
            assertFalse("Bookie should have shutdown on losing zk session", server.isBookieRunning());
            assertFalse("Nio Server should have shutdown on losing zk session", server.isNioServerRunning());
            assertFalse("Bookie Server should have shutdown on losing zk session", server.isRunning());
        } finally {
            server.shutdown();
        }
    }
}
View Full Code Here

    } catch (Exception e) {
      LOG.error("Exception in test", e);
      throw e;
    } finally {
      if (replacementBookie != null) {
        replacementBookie.shutdown();
      }
      bookieToFail.shutdown();

      if (bkutil.checkBookiesUp(numBookies, 30) != numBookies) {
        LOG.warn("Not all bookies from this test shut down, expect errors");
View Full Code Here

    } catch (Exception e) {
      LOG.error("Exception in test", e);
      throw e;
    } finally {
      if (replacementBookie != null) {
        replacementBookie.shutdown();
      }
      bookieToFail.shutdown();

      if (bkutil.checkBookiesUp(numBookies, 30) != numBookies) {
        LOG.warn("Not all bookies from this test shut down, expect errors");
View Full Code Here

      assertTrue(fs.exists(p1));
      assertFalse(fs.exists(p2));
    } finally {
      newBookie.shutdown();
      if (replacementBookie != null) {
        replacementBookie.shutdown();
      }

      if (cluster != null) {
        cluster.shutdown();
      }
View Full Code Here

    public void tearDownOneBookieServer() throws Exception {
        Random r = new Random();
        int bi = r.nextInt(bookiesList.size());
        BookieServer bs = bookiesList.get(bi);
        bs.shutdown();
        bookiesList.remove(bi);
        bkConfsList.remove(bi);
    }
   
    public void startUpNewBookieServer() throws Exception {
View Full Code Here

    public ServerConfiguration killBookie(int index) throws Exception {
        if (index >= bs.size()) {
            throw new IOException("Bookie does not exist");
        }
        BookieServer server = bs.get(index);
        server.shutdown();
        stopAutoRecoveryService(server);
        bs.remove(server);
        return bsConfs.remove(index);
    }
View Full Code Here

    public ServerConfiguration killBookie(int index) throws InterruptedException, IOException {
        if (index >= bs.size()) {
            throw new IOException("Bookie does not exist");
        }
        BookieServer server = bs.get(index);
        server.shutdown();
        bs.remove(server);
        return bsConfs.remove(index);
    }

    /**
 
View Full Code Here

   
    public void tearDownOneBookieServer() throws Exception {
        Random r = new Random();
        int bi = r.nextInt(bookiesList.size());
        BookieServer bs = bookiesList.get(bi);
        bs.shutdown();
        bookiesList.remove(bi);
        bkConfsList.remove(bi);
    }
   
    public void startUpNewBookieServer() throws Exception {
View Full Code Here

            Thread.sleep(3000);
            assertFalse("Bookie should have shutdown on losing zk session", server.isBookieRunning());
            assertFalse("Nio Server should have shutdown on losing zk session", server.isNioServerRunning());
            assertFalse("Bookie Server should have shutdown on losing zk session", server.isRunning());
        } finally {
            server.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.