当前位置: 首页>>代码示例>>Java>>正文


Java RegionServerStartupResponse.Builder方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java RegionServerStartupResponse.Builder方法的具体用法?Java RegionServerStartupResponse.Builder怎么用?Java RegionServerStartupResponse.Builder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse的用法示例。


在下文中一共展示了RegionServerStartupResponse.Builder方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: regionServerStartup

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
@Override
public RegionServerStartupResponse regionServerStartup(
    RpcController controller, RegionServerStartupRequest request) throws ServiceException {
  // Register with server manager
  try {
    master.checkServiceStarted();
    InetAddress ia = master.getRemoteInetAddress(
      request.getPort(), request.getServerStartCode());
    // if regionserver passed hostname to use,
    // then use it instead of doing a reverse DNS lookup
    ServerName rs = master.serverManager.regionServerStartup(request, ia);

    // Send back some config info
    RegionServerStartupResponse.Builder resp = createConfigurationSubset();
    NameStringPair.Builder entry = NameStringPair.newBuilder()
      .setName(HConstants.KEY_FOR_HOSTNAME_SEEN_BY_MASTER)
      .setValue(rs.getHostname());
    resp.addMapEntries(entry.build());

    return resp.build();
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:25,代码来源:MasterRpcServices.java

示例2: regionServerStartup

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
@Override
public RegionServerStartupResponse regionServerStartup(
    RpcController controller, RegionServerStartupRequest request) throws ServiceException {
  // Register with server manager
  try {
    master.checkServiceStarted();
    InetAddress ia = master.getRemoteInetAddress(
      request.getPort(), request.getServerStartCode());
    ServerName rs = master.serverManager.regionServerStartup(ia, request.getPort(),
      request.getServerStartCode(), request.getServerCurrentTime());

    // Send back some config info
    RegionServerStartupResponse.Builder resp = createConfigurationSubset();
    NameStringPair.Builder entry = NameStringPair.newBuilder()
      .setName(HConstants.KEY_FOR_HOSTNAME_SEEN_BY_MASTER)
      .setValue(rs.getHostname());
    resp.addMapEntries(entry.build());

    return resp.build();
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:24,代码来源:MasterRpcServices.java

示例3: regionServerStartup

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
@Override
public RegionServerStartupResponse regionServerStartup(
    RpcController controller, RegionServerStartupRequest request) throws ServiceException {
  // Register with server manager
  try {
    InetAddress ia = getRemoteInetAddress(request.getPort(), request.getServerStartCode());
    ServerName rs = this.serverManager.regionServerStartup(ia, request.getPort(),
      request.getServerStartCode(), request.getServerCurrentTime());

    // Send back some config info
    RegionServerStartupResponse.Builder resp = createConfigurationSubset();
    NameStringPair.Builder entry = NameStringPair.newBuilder()
      .setName(HConstants.KEY_FOR_HOSTNAME_SEEN_BY_MASTER)
      .setValue(rs.getHostname());
    resp.addMapEntries(entry.build());

    return resp.build();
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:22,代码来源:HMaster.java

示例4: createConfigurationSubset

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
/**
 * @return Subset of configuration to pass initializing regionservers: e.g.
 * the filesystem to use and root directory to use.
 */
private RegionServerStartupResponse.Builder createConfigurationSubset() {
  RegionServerStartupResponse.Builder resp = addConfig(
    RegionServerStartupResponse.newBuilder(), HConstants.HBASE_DIR);
  resp = addConfig(resp, "fs.defaultFS");
  return addConfig(resp, "hbase.master.info.port");
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:11,代码来源:MasterRpcServices.java

示例5: addConfig

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
private RegionServerStartupResponse.Builder addConfig(
    final RegionServerStartupResponse.Builder resp, final String key) {
  NameStringPair.Builder entry = NameStringPair.newBuilder()
    .setName(key)
    .setValue(master.getConfiguration().get(key));
  resp.addMapEntries(entry.build());
  return resp;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:9,代码来源:MasterRpcServices.java

示例6: addConfig

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
private RegionServerStartupResponse.Builder addConfig(
    final RegionServerStartupResponse.Builder resp, final String key) {
  NameStringPair.Builder entry = NameStringPair.newBuilder()
    .setName(key)
    .setValue(this.conf.get(key));
  resp.addMapEntries(entry.build());
  return resp;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:9,代码来源:HMaster.java

示例7: createConfigurationSubset

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
/**
 * @return Subset of configuration to pass initializing regionservers: e.g.
 * the filesystem to use and root directory to use.
 */
protected RegionServerStartupResponse.Builder createConfigurationSubset() {
  RegionServerStartupResponse.Builder resp = addConfig(
    RegionServerStartupResponse.newBuilder(), HConstants.HBASE_DIR);
  return addConfig(resp, "fs.default.name");
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:10,代码来源:HMaster.java

示例8: createConfigurationSubset

import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse; //导入方法依赖的package包/类
/**
 * @return Subset of configuration to pass initializing regionservers: e.g.
 * the filesystem to use and root directory to use.
 */
private RegionServerStartupResponse.Builder createConfigurationSubset() {
  RegionServerStartupResponse.Builder resp = addConfig(
    RegionServerStartupResponse.newBuilder(), HConstants.HBASE_DIR);
  return addConfig(resp, "fs.defaultFS");
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:10,代码来源:MasterRpcServices.java


注:本文中的org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse.Builder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。