code: private int importTables(Referenceable databaseReferenceable, String databaseName, final boolean failOnError) throws Exception {
          int tablesImported = 0;
          List<String> hiveTables = hiveClient.getAllTables(databaseName);
          LOG.info("Importing tables {} for db {}", hiveTables.toString(), databaseName);
          for (String tableName : hiveTables) {
              int imported = importTable(databaseReferenceable, databaseName, tableName, failOnError);
              tablesImported += imported;
          }
  
          if (tablesImported == hiveTables.size()) {
              LOG.info("Successfully imported all {} tables from {} ", tablesImported, databaseName);
          } else {
              LOG.error("Able to import {} tables out of {} tables from {}. Please check logs for import errors", tablesImported, hiveTables.size(), databaseName);
          }
  
          return tablesImported;
      }
docs: Imports all tables for the given db
  @param databaseReferenceable
  @param databaseName
  @param failOnError
  @throws Exception