本文整理了Java中org.apache.hadoop.hbase.client.Admin.listDecommissionedRegionServers()
方法的一些代码示例,展示了Admin.listDecommissionedRegionServers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Admin.listDecommissionedRegionServers()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Admin
类名称:Admin
方法名:listDecommissionedRegionServers
[英]List region servers marked as decommissioned, which can not be assigned regions.
[中]列出标记为停用的区域服务器,这些服务器不能分配区域。
代码示例来源: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
@Test
public void testDecommissionRegionServers() throws Exception {
List<ServerName> decommissionedRegionServers = admin.listDecommissionedRegionServers();
assertTrue(decommissionedRegionServers.isEmpty());
assertEquals(2, admin.listDecommissionedRegionServers().size());
admin.recommissionRegionServer(server, encodedRegionNames);
assertTrue(admin.listDecommissionedRegionServers().isEmpty());
代码示例来源:origin: apache/hbase
serversToDecommission.add(targetServer);
admin.decommissionRegionServers(serversToDecommission, true);
assertEquals(1, admin.listDecommissionedRegionServers().size());
assertEquals(0, admin.listDecommissionedRegionServers().size());
admin.createTable(desc);
代码示例来源:origin: apache/hbase
deleteGroups();
for(ServerName sn : admin.listDecommissionedRegionServers()){
admin.recommissionRegionServer(sn, null);
assertTrue(admin.listDecommissionedRegionServers().isEmpty());
代码示例来源:origin: apache/hbase
assertEquals(1, admin.listDecommissionedRegionServers().size());
代码示例来源:origin: org.apache.hbase/hbase-server
@Test
public void testDecommissionRegionServers() throws Exception {
List<ServerName> decommissionedRegionServers = admin.listDecommissionedRegionServers();
assertTrue(decommissionedRegionServers.isEmpty());
assertEquals(2, admin.listDecommissionedRegionServers().size());
admin.recommissionRegionServer(server, encodedRegionNames);
assertTrue(admin.listDecommissionedRegionServers().isEmpty());
代码示例来源: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
serversToDecommission.add(targetServer);
admin.decommissionRegionServers(serversToDecommission, true);
assertEquals(1, admin.listDecommissionedRegionServers().size());
assertEquals(0, admin.listDecommissionedRegionServers().size());
admin.createTable(desc);
代码示例来源:origin: org.apache.hbase/hbase-rsgroup
deleteGroups();
for(ServerName sn : admin.listDecommissionedRegionServers()){
admin.recommissionRegionServer(sn, null);
assertTrue(admin.listDecommissionedRegionServers().isEmpty());
代码示例来源:origin: org.apache.hbase/hbase-rsgroup
assertEquals(1, admin.listDecommissionedRegionServers().size());
内容来源于网络,如有侵权,请联系作者删除!