gpt4 book ai didi

org.apache.hadoop.hbase.backup.example.ZKTableArchiveClient.disableHFileBackup()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 14:29:31 28 4
gpt4 key购买 nike

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

ZKTableArchiveClient.disableHFileBackup介绍

[英]Disable hfile backups for all tables.

Previously backed up files are still retained (if present).

Asynchronous operation - some extra HFiles may be retained, in the archive directory after disable is called, dependent on the latency in zookeeper to the servers.
[中]禁用所有表的hfile备份。
以前备份的文件仍会保留(如果存在)。
异步操作-根据zookeeper到服务器的延迟,在调用disable后,可能会在存档目录中保留一些额外的HFiles。

代码示例

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

/**
 * Disable hfile backups for the given table.
 * <p>
 * Previously backed up files are still retained (if present).
 * <p>
 * Asynchronous operation - some extra HFiles may be retained, in the archive directory after
 * disable is called, dependent on the latency in zookeeper to the servers.
 * @param table name of the table stop backing up
 * @throws IOException if an unexpected exception occurs
 * @throws KeeperException if zookeeper can't be reached
 */
public void disableHFileBackup(String table) throws IOException, KeeperException {
 disableHFileBackup(Bytes.toBytes(table));
}

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

@After
public void tearDown() throws Exception {
 try {
  FileSystem fs = UTIL.getTestFileSystem();
  // cleanup each of the files/directories registered
  for (Path file : toCleanup) {
  // remove the table and archive directories
   FSUtils.delete(fs, file, true);
  }
 } catch (IOException e) {
  LOG.warn("Failure to delete archive directory", e);
 } finally {
  toCleanup.clear();
 }
 // make sure that backups are off for all tables
 archivingClient.disableHFileBackup();
}

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

/**
 * Test turning on/off archiving
 */
@Test
public void testArchivingEnableDisable() throws Exception {
 // 1. turn on hfile backups
 LOG.debug("----Starting archiving");
 archivingClient.enableHFileBackupAsync(TABLE_NAME);
 assertTrue("Archving didn't get turned on", archivingClient
   .getArchivingEnabled(TABLE_NAME));
 // 2. Turn off archiving and make sure its off
 archivingClient.disableHFileBackup();
 assertFalse("Archving didn't get turned off.", archivingClient.getArchivingEnabled(TABLE_NAME));
 // 3. Check enable/disable on a single table
 archivingClient.enableHFileBackupAsync(TABLE_NAME);
 assertTrue("Archving didn't get turned on", archivingClient
   .getArchivingEnabled(TABLE_NAME));
 // 4. Turn off archiving and make sure its off
 archivingClient.disableHFileBackup(TABLE_NAME);
 assertFalse("Archving didn't get turned off for " + STRING_TABLE_NAME,
  archivingClient.getArchivingEnabled(TABLE_NAME));
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Disable hfile backups for the given table.
 * <p>
 * Previously backed up files are still retained (if present).
 * <p>
 * Asynchronous operation - some extra HFiles may be retained, in the archive directory after
 * disable is called, dependent on the latency in zookeeper to the servers.
 * @param table name of the table stop backing up
 * @throws IOException if an unexpected exception occurs
 * @throws KeeperException if zookeeper can't be reached
 */
public void disableHFileBackup(String table) throws IOException, KeeperException {
 disableHFileBackup(Bytes.toBytes(table));
}

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

@After
public void tearDown() throws Exception {
 try {
  FileSystem fs = UTIL.getTestFileSystem();
  // cleanup each of the files/directories registered
  for (Path file : toCleanup) {
  // remove the table and archive directories
   FSUtils.delete(fs, file, true);
  }
 } catch (IOException e) {
  LOG.warn("Failure to delete archive directory", e);
 } finally {
  toCleanup.clear();
 }
 // make sure that backups are off for all tables
 archivingClient.disableHFileBackup();
}

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

/**
 * Test turning on/off archiving
 */
@Test
public void testArchivingEnableDisable() throws Exception {
 // 1. turn on hfile backups
 LOG.debug("----Starting archiving");
 archivingClient.enableHFileBackupAsync(TABLE_NAME);
 assertTrue("Archving didn't get turned on", archivingClient
   .getArchivingEnabled(TABLE_NAME));
 // 2. Turn off archiving and make sure its off
 archivingClient.disableHFileBackup();
 assertFalse("Archving didn't get turned off.", archivingClient.getArchivingEnabled(TABLE_NAME));
 // 3. Check enable/disable on a single table
 archivingClient.enableHFileBackupAsync(TABLE_NAME);
 assertTrue("Archving didn't get turned on", archivingClient
   .getArchivingEnabled(TABLE_NAME));
 // 4. Turn off archiving and make sure its off
 archivingClient.disableHFileBackup(TABLE_NAME);
 assertFalse("Archving didn't get turned off for " + STRING_TABLE_NAME,
  archivingClient.getArchivingEnabled(TABLE_NAME));
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com