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

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

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

Admin.recommissionRegionServer介绍

[英]Remove decommission marker from a region server to allow regions assignments. Load regions onto the server if a list of regions is given. Region loading is asynchronous.
[中]从区域服务器中删除停用标记以允许区域分配。如果给定了区域列表,则将区域加载到服务器上。区域加载是异步的。

代码示例

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

List<byte[]> encodedRegionNames = serversToDecommssion.get(server).stream()
  .map(region -> region.getEncodedNameAsBytes()).collect(Collectors.toList());
admin.recommissionRegionServer(server, encodedRegionNames);

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

@Test
public void testAdminDrainAllowedOnSecureZK() throws Exception {
 if (!secureZKAvailable) {
  return;
 }
 List<ServerName> decommissionedServers = new ArrayList<>(1);
 decommissionedServers.add(ServerName.parseServerName("ZZZ,123,123"));
 // If unable to connect to secure ZK cluster then this operation would fail.
 TEST_UTIL.getAdmin().decommissionRegionServers(decommissionedServers, false);
 decommissionedServers = TEST_UTIL.getAdmin().listDecommissionedRegionServers();
 assertEquals(1, decommissionedServers.size());
 assertEquals(ServerName.parseServerName("ZZZ,123,123"), decommissionedServers.get(0));
 TEST_UTIL.getAdmin().recommissionRegionServer(decommissionedServers.get(0), null);
 decommissionedServers = TEST_UTIL.getAdmin().listDecommissionedRegionServers();
 assertEquals(0, decommissionedServers.size());
}

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

admin.recommissionRegionServer(targetServer, null);
assertEquals(0, admin.listDecommissionedRegionServers().size());
admin.createTable(desc);

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

admin.recommissionRegionServer(sn, null);

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

List<byte[]> encodedRegionNames = serversToDecommssion.get(server).stream()
  .map(region -> region.getEncodedNameAsBytes()).collect(Collectors.toList());
admin.recommissionRegionServer(server, encodedRegionNames);

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

@Test
public void testAdminDrainAllowedOnSecureZK() throws Exception {
 if (!secureZKAvailable) {
  return;
 }
 List<ServerName> decommissionedServers = new ArrayList<>(1);
 decommissionedServers.add(ServerName.parseServerName("ZZZ,123,123"));
 // If unable to connect to secure ZK cluster then this operation would fail.
 TEST_UTIL.getAdmin().decommissionRegionServers(decommissionedServers, false);
 decommissionedServers = TEST_UTIL.getAdmin().listDecommissionedRegionServers();
 assertEquals(1, decommissionedServers.size());
 assertEquals(ServerName.parseServerName("ZZZ,123,123"), decommissionedServers.get(0));
 TEST_UTIL.getAdmin().recommissionRegionServer(decommissionedServers.get(0), null);
 decommissionedServers = TEST_UTIL.getAdmin().listDecommissionedRegionServers();
 assertEquals(0, decommissionedServers.size());
}

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

admin.recommissionRegionServer(targetServer, null);
assertEquals(0, admin.listDecommissionedRegionServers().size());
admin.createTable(desc);

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

admin.recommissionRegionServer(sn, null);

相关文章

Admin类方法