tele-share
 1 public static boolean isExistColumnFamily(String tableName,String cf) throws IOException {
 2         if(isExistTable(tableName)) {
 3             Table table = conn.getTable(TableName.valueOf(tableName));
 4             TableDescriptor tableDescriptor = table.getDescriptor();
 5             ColumnFamilyDescriptor descriptor = tableDescriptor.getColumnFamily(Bytes.toBytes(cf));
 6             return descriptor==null?false:true;
 7         }else {
 8             return false;
 9         }
10     }
11 
12 
13     public static boolean isExistTable(String tableName) throws IOException {
14         return admin.tableExists(TableName.valueOf(tableName));
15     }

 

分类:

技术点:

相关文章:

  • 2022-03-08
  • 2021-12-19
  • 2022-02-23
  • 2021-12-17
  • 2021-12-22
  • 2022-02-14
  • 2021-07-12
  • 2021-11-14
猜你喜欢
  • 2021-12-27
  • 2021-11-18
  • 2021-09-26
  • 2022-02-02
  • 2021-09-26
  • 2022-01-24
  • 2021-05-29
相关资源
相似解决方案