当前位置: 首页>>代码示例>>Java>>正文


Java DeleteTableHandler类代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.master.handler.DeleteTableHandler的典型用法代码示例。如果您正苦于以下问题:Java DeleteTableHandler类的具体用法?Java DeleteTableHandler怎么用?Java DeleteTableHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DeleteTableHandler类属于org.apache.hadoop.hbase.master.handler包,在下文中一共展示了DeleteTableHandler类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: disableAndDeleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
private void disableAndDeleteTable(MasterServices master, TableName tableName) throws IOException {
  LOG.error(tableName + " already exists.  Disabling and deleting table " + tableName + '.');
  boolean disabled = master.getAssignmentManager().getZKTable().isDisabledTable(tableName);
  if (false == disabled) {
    LOG.info("Disabling table " + tableName + '.');
    new DisableTableHandler(master, tableName, master.getCatalogTracker(),
        master.getAssignmentManager(), master.getTableLockManager(), false).prepare().process();
    if (false == master.getAssignmentManager().getZKTable().isDisabledTable(tableName)) {
      throw new DoNotRetryIOException("Table " + tableName + " not disabled.");
    }
  }
  LOG.info("Disabled table " + tableName + '.');
  LOG.info("Deleting table " + tableName + '.');
  new DeleteTableHandler(tableName, master, master).prepare().process();
  if (true == MetaReader.tableExists(master.getCatalogTracker(), tableName)) {
    throw new DoNotRetryIOException("Table " + tableName + " not  deleted.");
  }
  LOG.info("Deleted table " + tableName + '.');
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:20,代码来源:IndexMasterObserver.java

示例2: postDeleteTableHandler

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
    TableName tableName) throws IOException {
  LOG.info("Entered into postDeleteTableHandler of table " + tableName + '.');
  MasterServices master = ctx.getEnvironment().getMasterServices();
  TableName indexTableName = TableName.valueOf(IndexUtils.getIndexTableName(tableName));
  boolean indexTablePresent =
      master.getAssignmentManager().getZKTable().isTablePresent(indexTableName);
  // Not checking for disabled state because before deleting user table both user and index table
  // should be disabled.
  if ((!IndexUtils.isIndexTable(tableName)) && indexTablePresent) {
    LoadBalancer balancer = master.getAssignmentManager().getBalancer();
    if (balancer instanceof SecIndexLoadBalancer) {
      ((SecIndexLoadBalancer) balancer).removeIndexedTable(tableName);
    }
    DeleteTableHandler dth = new DeleteTableHandler(indexTableName, master, master);
    dth.prepare();
    dth.process();
  }
  LOG.info("Exiting from postDeleteTableHandler of table " + tableName + '.');
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:22,代码来源:IndexMasterObserver.java

示例3: disableAndDeleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
private void disableAndDeleteTable(MasterServices master, String tableName) throws IOException {
  byte[] tableNameInBytes = Bytes.toBytes(tableName);
  LOG.error(tableName + " already exists.  Disabling and deleting table " + tableName + '.');
  boolean disabled = master.getAssignmentManager().getZKTable().isDisabledTable(tableName);
  if (false == disabled) {
    LOG.info("Disabling table " + tableName + '.');
    new DisableTableHandler(master, tableNameInBytes, master.getCatalogTracker(),
        master.getAssignmentManager(), false).process();
    if (false == master.getAssignmentManager().getZKTable().isDisabledTable(tableName)) {
      throw new IOException("Table " + tableName + " not disabled.");
    }
  }
  LOG.info("Disabled table " + tableName + '.');
  LOG.info("Deleting table " + tableName + '.');
  new DeleteTableHandler(tableNameInBytes, master, master).process();
  if (true == MetaReader.tableExists(master.getCatalogTracker(), tableName)) {
    throw new IOException("Table " + tableName + " not  deleted.");
  }
  LOG.info("Deleted table " + tableName + '.');
}
 
开发者ID:Huawei-Hadoop,项目名称:hindex,代码行数:21,代码来源:IndexMasterObserver.java

示例4: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final byte [] tableName) throws IOException {
  checkInitialized();
  if (cpHost != null) {
    cpHost.preDeleteTable(tableName);
  }
  this.executorService.submit(new DeleteTableHandler(tableName, this, this));
  if (cpHost != null) {
    cpHost.postDeleteTable(tableName);
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:12,代码来源:HMaster.java

示例5: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final TableName tableName) throws IOException {
    checkInitialized();
    if (cpHost != null) {
        cpHost.preDeleteTable(tableName);
    }
    LOG.info(getClientIdAuditPrefix() + " delete " + tableName);
    this.service.submit(new DeleteTableHandler(tableName, this, this).prepare());
    if (cpHost != null) {
        cpHost.postDeleteTable(tableName);
    }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:13,代码来源:HMaster.java

示例6: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final TableName tableName) throws IOException {
  checkInitialized();
  if (cpHost != null) {
    cpHost.preDeleteTable(tableName);
  }
  LOG.info(getClientIdAuditPrefix() + " delete " + tableName);
  this.executorService.submit(new DeleteTableHandler(tableName, this, this).prepare());
  if (cpHost != null) {
    cpHost.postDeleteTable(tableName);
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:13,代码来源:HMaster.java

示例7: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final byte [] tableName) throws IOException {
  if (cpHost != null) {
    cpHost.preDeleteTable(tableName);
  }
  this.executorService.submit(new DeleteTableHandler(tableName, this, this));

  if (cpHost != null) {
    cpHost.postDeleteTable(tableName);
  }
}
 
开发者ID:lifeng5042,项目名称:RStore,代码行数:12,代码来源:HMaster.java

示例8: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final TableName tableName) throws IOException {
  checkInitialized();
  if (cpHost != null) {
    cpHost.preDeleteTable(tableName);
  }
  LOG.info(getClientIdAuditPrefix() + " delete " + tableName);
  this.service.submit(new DeleteTableHandler(tableName, this, this).prepare());
  if (cpHost != null) {
    cpHost.postDeleteTable(tableName);
  }
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:13,代码来源:HMaster.java

示例9: deleteTable

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void deleteTable(final byte[] tableName) throws IOException {
  checkInitialized();
  if (cpHost != null) {
    cpHost.preDeleteTable(tableName);
  }
  this.executorService.submit(new DeleteTableHandler(tableName, this, this));
  if (cpHost != null) {
    cpHost.postDeleteTable(tableName);
  }
}
 
开发者ID:daidong,项目名称:DominoHBase,代码行数:12,代码来源:HMaster.java

示例10: postDeleteTableHandler

import org.apache.hadoop.hbase.master.handler.DeleteTableHandler; //导入依赖的package包/类
@Override
public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
    byte[] tableName) throws IOException {
  LOG.info("Entered into postDeleteTableHandler of table " + Bytes.toString(tableName) + '.');
  MasterServices master = ctx.getEnvironment().getMasterServices();
  String indexTableName = IndexUtils.getIndexTableName(tableName);
  boolean indexTablePresent =
      master.getAssignmentManager().getZKTable().isTablePresent(indexTableName);
  // Not checking for disabled state because before deleting user table both user and index table
  // should be disabled.
  if ((false == IndexUtils.isIndexTable(Bytes.toString(tableName))) && indexTablePresent) {
    new DeleteTableHandler(Bytes.toBytes(indexTableName), master, master).process();
  }
  LOG.info("Exiting from postDeleteTableHandler of table " + Bytes.toString(tableName) + '.');
}
 
开发者ID:Huawei-Hadoop,项目名称:hindex,代码行数:16,代码来源:IndexMasterObserver.java


注:本文中的org.apache.hadoop.hbase.master.handler.DeleteTableHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。