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

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

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

Admin.listReplicatedTableCFs介绍

[英]Find all table and column families that are replicated from this cluster
[中]查找从此群集复制的所有表族和列族

代码示例

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

/**
 * Find all column families that are replicated from this cluster
 * @return the full list of the replicated column families of this cluster as:
 *        tableName, family name, replicationType
 *
 * Currently replicationType is Global. In the future, more replication
 * types may be extended here. For example
 *  1) the replication may only apply to selected peers instead of all peers
 *  2) the replicationType may indicate the host Cluster servers as Slave
 *     for the table:columnFam.
 * @deprecated use {@link org.apache.hadoop.hbase.client.Admin#listReplicatedTableCFs()} instead
 */
@Deprecated
public List<HashMap<String, String>> listReplicated() throws IOException {
 List<HashMap<String, String>> replicationColFams = new ArrayList<>();
 admin.listReplicatedTableCFs().forEach(
  (tableCFs) -> {
   String table = tableCFs.getTable().getNameAsString();
   tableCFs.getColumnFamilyMap()
     .forEach(
      (cf, scope) -> {
       HashMap<String, String> replicationEntry = new HashMap<>();
       replicationEntry.put(TNAME, table);
       replicationEntry.put(CFNAME, cf);
       replicationEntry.put(REPLICATIONTYPE, REPLICATIONGLOBAL);
       replicationColFams.add(replicationEntry);
      });
  });
 return replicationColFams;
}

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

List<TableCFs> replicatedTableCFs = admin.listReplicatedTableCFs();
if (replicatedTableCFs.isEmpty()) {
 LOG.info("No tables with a configured replication peer were found.");

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

List<TableCFs> replicationColFams = hbaseAdmin.listReplicatedTableCFs();
int[] match = new int[numOfTables]; // array of 3 with init value of zero

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

/**
 * Find all column families that are replicated from this cluster
 * @return the full list of the replicated column families of this cluster as:
 *        tableName, family name, replicationType
 *
 * Currently replicationType is Global. In the future, more replication
 * types may be extended here. For example
 *  1) the replication may only apply to selected peers instead of all peers
 *  2) the replicationType may indicate the host Cluster servers as Slave
 *     for the table:columnFam.
 * @deprecated use {@link org.apache.hadoop.hbase.client.Admin#listReplicatedTableCFs()} instead
 */
@Deprecated
public List<HashMap<String, String>> listReplicated() throws IOException {
 List<HashMap<String, String>> replicationColFams = new ArrayList<>();
 admin.listReplicatedTableCFs().forEach(
  (tableCFs) -> {
   String table = tableCFs.getTable().getNameAsString();
   tableCFs.getColumnFamilyMap()
     .forEach(
      (cf, scope) -> {
       HashMap<String, String> replicationEntry = new HashMap<>();
       replicationEntry.put(TNAME, table);
       replicationEntry.put(CFNAME, cf);
       replicationEntry.put(REPLICATIONTYPE, REPLICATIONGLOBAL);
       replicationColFams.add(replicationEntry);
      });
  });
 return replicationColFams;
}

代码示例来源:origin: com.aliyun.hbase/alihbase-client

/**
 * Find all column families that are replicated from this cluster
 * @return the full list of the replicated column families of this cluster as:
 *        tableName, family name, replicationType
 *
 * Currently replicationType is Global. In the future, more replication
 * types may be extended here. For example
 *  1) the replication may only apply to selected peers instead of all peers
 *  2) the replicationType may indicate the host Cluster servers as Slave
 *     for the table:columnFam.
 * @deprecated use {@link org.apache.hadoop.hbase.client.Admin#listReplicatedTableCFs()} instead
 */
@Deprecated
public List<HashMap<String, String>> listReplicated() throws IOException {
 List<HashMap<String, String>> replicationColFams = new ArrayList<>();
 admin.listReplicatedTableCFs().forEach(
  (tableCFs) -> {
   String table = tableCFs.getTable().getNameAsString();
   tableCFs.getColumnFamilyMap()
     .forEach(
      (cf, scope) -> {
       HashMap<String, String> replicationEntry = new HashMap<>();
       replicationEntry.put(TNAME, table);
       replicationEntry.put(CFNAME, cf);
       replicationEntry.put(REPLICATIONTYPE, REPLICATIONGLOBAL);
       replicationColFams.add(replicationEntry);
      });
  });
 return replicationColFams;
}

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

List<TableCFs> replicationColFams = hbaseAdmin.listReplicatedTableCFs();
int[] match = new int[numOfTables]; // array of 3 with init value of zero

相关文章

Admin类方法