本文整理了Java中org.apache.hadoop.hbase.client.Admin.close()
方法的一些代码示例,展示了Admin.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Admin.close()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.client.Admin
类名称:Admin
方法名:close
[英]Close a region. For expert-admins. Runs close on the regionserver. The master will not be informed of the close.
[中]关闭一个区域。对于专家管理员。在regionserver上运行。船长将不会被告知关闭。
代码示例来源:origin: thinkaurelius/titan
@Override
public void close() throws IOException
{
adm.close();
}
}
代码示例来源:origin: apache/hbase
@Override
public void close() throws IOException {
if (this.admin != null) this.admin.close();
}
代码示例来源:origin: apache/hbase
@Override
public void close() throws IOException {
if (this.connection != null) {
this.connection.close();
}
admin.close();
}
代码示例来源:origin: apache/hive
@Override
public void close() throws IOException {
if (admin != null) {
Connection connection = admin.getConnection();
admin.close();
admin = null;
if (connection != null) {
connection.close();
}
}
}
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
tableExecutorService.shutdown();
hbfsckExecutorService.shutdown();
admin.close();
TEST_UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
if (ADMIN != null) {
ADMIN.close();
}
UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
if (ADMIN != null) ADMIN.close();
UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@After
public void tearDown() throws Exception {
// Set to true while stopping cluster
hasAccess = true;
admin.close();
UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void afterAllTests() throws Exception {
TEST_UTIL.shutdownMiniCluster();
if (ADMIN != null) ADMIN.close();
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
hbaseAdmin.close();
TEST_UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@Override
public void close() throws IOException {
if (this.admin != null) {
admin.close();
}
if (this.connection != null && !this.connection.isClosed()) {
this.connection.close();
}
}
代码示例来源:origin: apache/hbase
@BeforeClass
public static void beforeClass() throws Exception {
UTIL.getConfiguration().set("hbase.client.retries.number", "3");
UTIL.startMiniCluster();
Admin admin = UTIL.getAdmin();
HTableDescriptor tableDescriptor = new HTableDescriptor(TableName.valueOf(tableAname));
for (HColumnDescriptor family : families) {
tableDescriptor.addFamily(family);
}
admin.createTable(tableDescriptor);
admin.close();
}
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
admin1.close();
admin2.close();
adminExt.close();
connection1.close();
connection2.close();
TestReplicationBase.tearDownAfterClass();
}
代码示例来源:origin: apache/hbase
@After
public void tearDown() throws Exception {
this.admin.close();
for (TableDescriptor htd: this.admin.listTableDescriptors()) {
LOG.info("Tear down, remove table=" + htd.getTableName());
TESTING_UTIL.deleteTable(htd.getTableName());
}
}
代码示例来源:origin: apache/hbase
private List<HRegionLocation> splitTable(final Table t)
throws IOException, InterruptedException {
// Split this table in two.
Admin admin = TEST_UTIL.getAdmin();
admin.split(t.getName());
admin.close();
List<HRegionLocation> regions = waitOnSplit(t);
assertTrue(regions.size() > 1);
return regions;
}
代码示例来源:origin: apache/hbase
@Override
public Object run() throws Exception {
Connection unmanagedConnection =
ConnectionFactory.createConnection(TEST_UTIL.getConfiguration());
Admin admin = unmanagedConnection.getAdmin();
try {
return Arrays.asList(admin.listTableNames());
} finally {
admin.close();
unmanagedConnection.close();
}
}
};
代码示例来源:origin: apache/hbase
@AfterClass
public static void tearDownAfterClass() throws Exception {
if (ADMIN != null) ADMIN.close();
if (CONNECTION != null && !CONNECTION.isClosed()) CONNECTION.close();
TEST_UTIL.shutdownMiniCluster();
}
代码示例来源:origin: apache/hbase
@After
public void tearDown() throws Exception {
UTIL.deleteTable(TABLE_NAME);
SnapshotTestingUtils.deleteAllSnapshots(this.admin);
this.admin.close();
SnapshotTestingUtils.deleteArchiveDirectory(UTIL);
}
代码示例来源:origin: apache/hbase
@After
public void tearDown() throws Exception {
admin.disableTable(tableName);
admin.deleteTable(tableName);
admin.close();
TEST_UTIL.shutdownMiniCluster();
TEST_UTIL.getTestFileSystem().delete(TEST_UTIL.getDataTestDir(), true);
}
代码示例来源:origin: apache/hbase
@Test
public void testMultiSwitches() throws IOException {
Admin admin = TEST_UTIL.getAdmin();
boolean[] switches = admin.setSplitOrMergeEnabled(false, false,
MasterSwitchType.SPLIT, MasterSwitchType.MERGE);
for (boolean s : switches){
assertTrue(s);
}
assertFalse(admin.isSplitOrMergeEnabled(MasterSwitchType.SPLIT));
assertFalse(admin.isSplitOrMergeEnabled(MasterSwitchType.MERGE));
admin.close();
}
内容来源于网络,如有侵权,请联系作者删除!