Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HServerAddress


          this.historian.addRegionOpen(regionInfo, serverAddress);
          this.historian.getRegionHistory("dummy");
          synchronized (master.regionManager) {
            if (isMetaTable) {
              // It's a meta region.
              MetaRegion m = new MetaRegion(new HServerAddress(serverAddress),
                  regionInfo.getRegionName(), regionInfo.getStartKey());
              if (!master.regionManager.isInitialMetaScanComplete()) {
                // Put it on the queue to be scanned for the first time.
                LOG.debug("Adding " + m.toString() + " to regions to scan");
                master.regionManager.addMetaRegionToScan(m);
View Full Code Here


**/
public class IndexedRegionServer extends TransactionalRegionServer implements
    IndexedRegionInterface {

  public IndexedRegionServer(HBaseConfiguration conf) throws IOException {
    this(new HServerAddress(conf.get(REGIONSERVER_ADDRESS,
        DEFAULT_REGIONSERVER_ADDRESS)), conf);
  }
View Full Code Here

   * @param conf - Configuration object
   * @throws IOException
   */
  public HMaster(HBaseConfiguration conf) throws IOException {
    this(new Path(conf.get(HBASE_DIR)),
        new HServerAddress(conf.get(MASTER_ADDRESS, DEFAULT_MASTER_ADDRESS)),
        conf);
  }
View Full Code Here

    this.server = HBaseRPC.getServer(this, address.getBindAddress(),
        address.getPort(), conf.getInt("hbase.regionserver.handler.count", 10),
        false, conf);

    //  The rpc-server port can be ephemeral... ensure we have the correct info
    this.address = new HServerAddress(server.getListenerAddress());
    conf.set(MASTER_ADDRESS, address.toString());

    this.connection = ServerConnectionManager.getConnection(conf);

    this.metaRescanInterval =
View Full Code Here

  /**
   * @return Location of the <code>-ROOT-</code> region.
   */
  public HServerAddress getRootRegionLocation() {
    HServerAddress rootServer = null;
    if (!shutdownRequested.get() && !closed.get()) {
      rootServer = regionManager.getRootRegionLocation();
    }
    return rootServer;
  }
View Full Code Here

    // If the address given is not the default one,
    // use the IP given by the user.
    if (serverInfo.getServerAddress().getBindAddress().equals(
        DEFAULT_HOST)) {
      String rsAddress = HBaseServer.getRemoteAddress();
      serverInfo.setServerAddress(new HServerAddress(rsAddress,
        serverInfo.getServerAddress().getPort()));
    }
    // Register with server manager
    this.serverManager.regionServerStartup(serverInfo);
    // Send back some config info
View Full Code Here

            break;
          HRegionInfo info = Writables.getHRegionInfo(data.get(COL_REGIONINFO));
          if (Bytes.compareTo(info.getTableDesc().getName(), tableName) == 0) {
            Cell cell = data.get(COL_SERVER);
            if (cell != null) {
              HServerAddress server =
                new HServerAddress(Bytes.toString(cell.getValue()));
              result.add(new Pair<HRegionInfo,HServerAddress>(info, server));
            }
          } else {
            break;
          }
View Full Code Here

          if (Bytes.compareTo(info.getTableDesc().getName(), tableName) == 0) {
            if ((Bytes.compareTo(info.getStartKey(), rowKey) >= 0) &&
                (Bytes.compareTo(info.getEndKey(), rowKey) < 0)) {
                Cell cell = data.get(COL_SERVER);
                if (cell != null) {
                  HServerAddress server =
                    new HServerAddress(Bytes.toString(cell.getValue()));
                  return new Pair<HRegionInfo,HServerAddress>(info, server);
                }
            }
          } else {
            break;
View Full Code Here

        HConstants.LATEST_TIMESTAMP, 1, -1L);
      if(data == null || data.size() <= 0) continue;
      HRegionInfo info = Writables.getHRegionInfo(data.get(COL_REGIONINFO));
      Cell cell = data.get(COL_SERVER);
      if(cell != null) {
        HServerAddress server =
          new HServerAddress(Bytes.toString(cell.getValue()));
        return new Pair<HRegionInfo,HServerAddress>(info, server);
      }
    }
    return null;
  }
View Full Code Here

      throw new IOException("unsupported modifyTable op " + op);
    }
  }

  public HServerAddress findRootRegion() {
    HServerAddress rootServer = null;
    if (!regionManager.inSafeMode()) {
      rootServer = regionManager.getRootRegionLocation();
    }
    return rootServer;
  }
View Full Code Here

TOP

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

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.