Examples of MasterNotRunningException


Examples of org.apache.hadoop.hbase.MasterNotRunningException

      tries++;
      if (tries >= numRetries) {
        // we should delete connection between client and zookeeper
        HConnectionManager.deleteStaleConnection(this.connection);
        throw new MasterNotRunningException("Retried " + numRetries + " times");
      }

      try {
        Thread.sleep(getPauseTime(tries));
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        // we should delete connection between client and zookeeper
        HConnectionManager.deleteStaleConnection(this.connection);
        throw new MasterNotRunningException(
          "Interrupted after "+tries+" tries");
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.exceptions.MasterNotRunningException

        ServerName sn = MasterAddressTracker.getMasterAddress(zkw);
        if (sn == null) {
          String msg =
            "ZooKeeper available but no active master location found";
          LOG.info(msg);
          throw new MasterNotRunningException(msg);
        }


        InetSocketAddress isa =
          new InetSocketAddress(sn.getHostname(), sn.getPort());
        MasterProtocol tryMaster = rpcEngine.getProxy(
            masterProtocolState.protocolClass,
            isa, this.conf, this.rpcTimeout);

        if (tryMaster.isMasterRunning(
            null, RequestConverter.buildIsMasterRunningRequest()).getIsMasterRunning()) {
          return tryMaster;
        } else {
          String msg = "Can create a proxy to master, but it is not running";
          LOG.info(msg);
          throw new MasterNotRunningException(msg);
        }
      } finally {
        zkw.close();
      }
    }
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.