Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.CoordinatedStateManager


  public void testRPCException() throws Exception {
    HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
    TEST_UTIL.startMiniZKCluster();
    Configuration conf = TEST_UTIL.getConfiguration();
    conf.set(HConstants.MASTER_PORT, "0");
    CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(conf);
    HMaster hm = new HMaster(conf, cp);
    ServerName sm = hm.getServerName();
    RpcClient rpcClient = new RpcClient(conf, HConstants.CLUSTER_ID_DEFAULT);
    try {
      int i = 0;
View Full Code Here


   * @throws InterruptedException
   */
  @Test (timeout=30000)
  public void testStopDuringStart()
  throws IOException, KeeperException, InterruptedException {
    CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(
      TESTUTIL.getConfiguration());
    HMaster master = new HMaster(TESTUTIL.getConfiguration(), cp);
    master.start();
    // Immediately have it stop.  We used hang in assigning meta.
    master.stopMaster();
View Full Code Here

    // Create master.  Subclass to override a few methods so we can insert mocks
    // and get notification on transitions.  We need to fake out any rpcs the
    // master does opening/closing regions.  Also need to fake out the address
    // of the 'remote' mocked up regionservers.
    CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(
      TESTUTIL.getConfiguration());
    HMaster master = new HMaster(conf, cp) {
      InetAddress getRemoteInetAddress(final int port, final long serverStartCode)
      throws UnknownHostException {
        // Return different address dependent on port passed.
View Full Code Here

    final Configuration conf = TESTUTIL.getConfiguration();
    final ServerName newServer = ServerName.valueOf("test.sample", 1, 101);
    final ServerName deadServer = ServerName.valueOf("test.sample", 1, 100);
    final MockRegionServer rs0 = new MockRegionServer(conf, newServer);

    CoordinatedStateManager cp = CoordinatedStateManagerFactory.getCoordinatedStateManager(
      TESTUTIL.getConfiguration());
    HMaster master = new HMaster(conf, cp) {
      @Override
      void assignMeta(MonitoredTask status, Set<ServerName> previouslyFailedMeatRSs) {
      }
View Full Code Here

        ((LocalHMaster)cluster.getMaster(0)).setZKCluster(zooKeeperCluster);
        cluster.startup();
        waitOnMasterThreads(cluster);
      } else {
        logProcessInfo(getConf());
        CoordinatedStateManager csm =
          CoordinatedStateManagerFactory.getCoordinatedStateManager(conf);
        HMaster master = HMaster.constructMaster(masterClass, conf, csm);
        if (master.isStopped()) {
          LOG.info("Won't bring the Master up as a shutdown is requested");
          return 1;
View Full Code Here

  /**
   * @return whether log is replaying
   */
  public boolean isLogReplaying() {
    CoordinatedStateManager m = server.getCoordinatedStateManager();
    if (m == null) return false;
    return ((BaseCoordinatedStateManager)m).getSplitLogManagerCoordination().isReplaying();
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.CoordinatedStateManager

Copyright © 2018 www.massapicom. 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.