Examples of HServerInfo


Examples of org.apache.hadoop.hbase.HServerInfo

   */
  @Override
  @QosPriority(priority=HIGH_QOS)
  public HServerInfo getHServerInfo() throws IOException {
    checkOpen();
    return new HServerInfo(new HServerAddress(this.isa),
      this.startcode, this.webuiport);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

   */
  @Override
  @QosPriority(priority=HConstants.HIGH_QOS)
  public HServerInfo getHServerInfo() throws IOException {
    checkOpen();
    return new HServerInfo(new HServerAddress(this.isa),
      this.startcode, this.rsInfo.getInfoPort());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

    String machineName = DNS.getDefaultHost(
        conf.get("hbase.regionserver.dns.interface","default"),
        conf.get("hbase.regionserver.dns.nameserver","default"));
    // Address is givin a default IP for the moment. Will be changed after
    // calling the master.
    this.serverInfo = new HServerInfo(new HServerAddress(
      new InetSocketAddress(address.getBindAddress(),
      this.server.getListenerAddress().getPort())), System.currentTimeMillis(),
      this.conf.getInt("hbase.regionserver.info.port", 60030), machineName);
   
    if (this.serverInfo.getServerAddress() == null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

          servers.remove(s);
          loadToServers.put(load, servers);
        }
      }
    }
    HServerInfo storedInfo = serversToServerInfo.remove(s);
    if (storedInfo != null && !master.closed.get()) {
      // The startup message was from a known server with the same name.
      // Timeout the old one right away.
      HServerAddress root = master.getRootRegionLocation();
      boolean rootServer = false;
      if (root != null && root.equals(storedInfo.getServerAddress())) {
        master.regionManager.unsetRootRegion();
        rootServer = true;
      }
      try {
        master.toDoQueue.put(
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

      // happen after check of MSG_REPORT_EXITING above, since region server
      // will send us one of these messages after it gets MSG_REGIONSERVER_STOP
      return new HMsg [] {REGIONSERVER_STOP};
    }

    HServerInfo storedInfo = serversToServerInfo.get(serverName);
    if (storedInfo == null) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("received server report from unknown server: " + serverName);
      }

      // The HBaseMaster may have been restarted.
      // Tell the RegionServer to start over and call regionServerStartup()
      return new HMsg[]{CALL_SERVER_STARTUP};
    } else if (storedInfo.getStartCode() != serverInfo.getStartCode()) {
      // This state is reachable if:
      //
      // 1) RegionServer A started
      // 2) RegionServer B started on the same machine, then
      //    clobbered A in regionServerStartup.
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

  }
 
  /** Cancel a server's lease and update its load information */
  private boolean cancelLease(final String serverName) {
    boolean leaseCancelled = false;
    HServerInfo info = serversToServerInfo.remove(serverName);
    // Only cancel lease and update load information once.
    // This method can be called a couple of times during shutdown.
    if (info != null) {
      LOG.info("Cancelling lease for " + serverName);
      if (master.getRootRegionLocation() != null &&
        info.getServerAddress().equals(master.getRootRegionLocation())) {
        master.regionManager.unsetRootRegion();
      }
      try {
        serverLeases.cancelLease(serverName);
      } catch (LeaseException e) {
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

    }

    public void leaseExpired() {
      LOG.info(server + " lease expired");
      // Remove the server from the known servers list and update load info
      HServerInfo info = serversToServerInfo.remove(server);
      boolean rootServer = false;
      if (info != null) {
        HServerAddress root = master.getRootRegionLocation();
        if (root != null && root.equals(info.getServerAddress())) {
          // NOTE: If the server was serving the root region, we cannot reassign
          // it here because the new server will start serving the root region
          // before ProcessServerShutdown has a chance to split the log file.
          master.regionManager.unsetRootRegion();
          rootServer = true;
        }
        String serverName = info.getServerAddress().toString();
        HServerLoad load = serversToLoad.remove(serverName);
        if (load != null) {
          synchronized (loadToServers) {
            Set<String> servers = loadToServers.get(load);
            if (servers != null) {
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

          this.master.regionManager.regionIsInTransition(info.getRegionName()) ||
          this.master.serverManager.isDead(serverName)) {

        return;
      }
      HServerInfo storedInfo = null;
      if (serverName.length() != 0) {
        storedInfo = this.master.serverManager.getServerInfo(serverName);
      }

      /*
       * If the startcode is off -- either null or doesn't match the start code
       * for the address -- then add it to the list of unassigned regions.
       */
      if (storedInfo == null || storedInfo.getStartCode() != startCode) {

        // The current assignment is invalid
        if (LOG.isDebugEnabled()) {
          LOG.debug("Current assignment of " + info.getRegionNameAsString() +
            " is not valid; " +
            (storedInfo == null ? " Server '" + serverName + "' unknown." :
                " serverInfo: " + storedInfo + ", passed startCode: " +
                startCode + ", storedInfo.startCode: " +
                storedInfo.getStartCode()));
        }

        // Recover the region server's log if there is one.
        // This is only done from here if we are restarting and there is stale
        // data in the meta region. Once we are on-line, dead server log
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

   */
  @Override
  @QosPriority(priority=HConstants.HIGH_QOS)
  public HServerInfo getHServerInfo() throws IOException {
    checkOpen();
    return new HServerInfo(new HServerAddress(this.isa),
      this.startcode, this.webuiport);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.HServerInfo

      out.print(msg );
      out.write("</p>\n\n<h2>Region Servers</h2>\n");
if (serverToServerInfos != null && serverToServerInfos.size() > 0) {
      out.write("\n<table>\n<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>\n");
   for (Map.Entry<String, HServerInfo> e: serverToServerInfos.entrySet()) {
       HServerInfo hsi = e.getValue();
       String url = "http://" +
         hsi.getServerAddress().getBindAddress().toString() + ":" +
         hsi.getInfoPort() + "/";
       String load = hsi.getLoad().toString();
       long startCode = hsi.getStartCode();
       String address = hsi.getServerAddress().toString();

      out.write("\n<tr><td><a href=\"");
      out.print( url );
      out.write('"');
      out.write('>');
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.