org.apache.hadoop.hbase.client.Admin.getOnlineRegions()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中org.apache.hadoop.hbase.client.Admin.getOnlineRegions()方法的一些代码示例,展示了Admin.getOnlineRegions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Admin.getOnlineRegions()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Admin
类名称:Admin
方法名:getOnlineRegions

Admin.getOnlineRegions介绍

[英]Get all the online regions on a region server.
[中]获取区域服务器上的所有联机区域。

代码示例

代码示例来源:origin: apache/hbase

List<HRegionInfo> regions = admin.getOnlineRegions(serverName);
LOG.info("serverName=" + serverName + ", regions=" +
  regions.stream().map(r -> r.getRegionNameAsString()).collect(Collectors.toList()));

代码示例来源:origin: larsgeorge/hbase-book

admin.getOnlineRegions(location.getServerName());
online = filterTableRegions(online, tableName);
int numOnline = online.size();
 online = admin.getOnlineRegions(location.getServerName());
 online = filterTableRegions(online, tableName);
 Thread.sleep(1 * 1000L);
 online = admin.getOnlineRegions(location.getServerName());
 online = filterTableRegions(online, tableName);
 Thread.sleep(1 * 1000L);

代码示例来源:origin: org.apache.hbase/hbase-server

List<HRegionInfo> regions = admin.getOnlineRegions(serverName);
LOG.info("serverName=" + serverName + ", regions=" +
  regions.stream().map(r -> r.getRegionNameAsString()).collect(Collectors.toList()));

代码示例来源:origin: org.apache.hbase/hbase-server

List<HRegionInfo> onlineRegions = admin.getOnlineRegions(
  rs2.getRegionServer().getServerName());
ArrayList<HRegionInfo> tableRegions = filterTableRegions(tableName, onlineRegions);

代码示例来源:origin: org.apache.hbase/hbase-rsgroup

if(master.getAssignmentManager().getRegionStates().getRegionAssignments()
   .containsValue(failoverRS.getServerName())) {
 for (HRegionInfo regionInfo : hbaseAdmin.getOnlineRegions(failoverRS.getServerName())) {
  hbaseAdmin.move(regionInfo.getEncodedNameAsBytes(),
    Bytes.toBytes(failoverRS.getServerName().getServerName()));

相关文章

Admin类方法