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

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

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

Admin.offline介绍

[英]Offline specified region from master's in-memory state. It will not attempt to reassign the region as in unassign. This API can be used when a region not served by any region server and still online as per Master's in memory state. If this API is incorrectly used on active region then master will loose track of that region. This is a special method that should be used by experts or hbck.
[中]从主机的内存状态中脱机指定区域。它不会像在“取消分配”中那样尝试重新分配区域。当某个区域未由任何区域服务器提供服务,并且根据主机的内存状态仍处于联机状态时,可以使用此API。如果此API在活动区域上使用不正确,则master将丢失该区域的跟踪。这是一种特殊方法,应由专家或hbck使用。

代码示例

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

@Override
public void call(Admin admin) throws Exception {
 admin.offline(new byte[0]);
}
@Override

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

admin.offline(regionName);
} catch (IOException ioe) {
 String notFoundMsg = "java.lang.NoSuchMethodException: " +

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

/**
 * This method is used to undeploy a region -- close it and attempt to
 * remove its state from the Master.
 */
protected void undeployRegion(Connection conn, ServerName sn,
  RegionInfo hri) throws IOException, InterruptedException {
 try {
  HBaseFsckRepair.closeRegionSilentlyAndWait(conn, sn, hri);
  if (!hri.isMetaRegion()) {
   admin.offline(hri.getRegionName());
  }
 } catch (IOException ioe) {
  LOG.warn("Got exception when attempting to offline region "
    + Bytes.toString(hri.getRegionName()), ioe);
 }
}
/**

代码示例来源:origin: larsgeorge/hbase-book

admin.offline(offline.getRegionName()); // co ClusterOperationExample-07-Offline Offline a region and print the list of all regions.
int revs = 0;
do {

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

@Override
public void call(Admin admin) throws Exception {
 admin.offline(new byte[0]);
}
@Override

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

admin.offline(regionName);
} catch (IOException ioe) {
 String notFoundMsg = "java.lang.NoSuchMethodException: " +

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

/**
 * This method is used to undeploy a region -- close it and attempt to
 * remove its state from the Master.
 */
protected void undeployRegion(Connection conn, ServerName sn,
  RegionInfo hri) throws IOException, InterruptedException {
 try {
  HBaseFsckRepair.closeRegionSilentlyAndWait(conn, sn, hri);
  if (!hri.isMetaRegion()) {
   admin.offline(hri.getRegionName());
  }
 } catch (IOException ioe) {
  LOG.warn("Got exception when attempting to offline region "
    + Bytes.toString(hri.getRegionName()), ioe);
 }
}
/**

相关文章

Admin类方法