class ThemisMasterObserver extends BaseMasterObserver {

  public static List<String> getThemisTables(HConnection connection) throws IOException {
    List<String> tableNames = new ArrayList<String>();
    HBaseAdmin admin = null;
    try {
      admin = new HBaseAdmin(connection);
      HTableDescriptor[] tables = admin.listTables();
      for (HTableDescriptor table : tables) {
        if (isThemisEnableTable(table)) {
          tableNames.add(table.getNameAsString());
        }
      }
    } catch (IOException e) {
      LOG.error("get table names fail", e);
      throw e;
    } finally {
      if (admin != null) {
        admin.close();
      }
    }
    return tableNames;
  }

}