private boolean createDbIfNotExists(IMetaStoreClient client, String dbName) throws IOException {
    boolean retVal;
    if (this.optimizedChecks) {
      try {
        retVal = this.tableAndDbExistenceCache.get(dbName, new Callable<Boolean>() {
          @Override
          public Boolean call() throws Exception {
            return ensureHiveDbExistence(dbName, client);
          }
        });
      } catch (ExecutionException ee) {
        throw new IOException("Database existence checking throwing execution exception.");
      }
      return retVal;
    } else {
      return this.ensureHiveDbExistence(dbName, client);
    }
  }
private boolean createDbIfNotExists ( IMetaStoreClient client , String dbName ) throws IOException { boolean retVal ; if ( this . optimizedChecks ) { try { retVal = this . tableAndDbExistenceCache . get ( dbName , new Callable < Boolean > ( ) { @ Override public Boolean call ( ) throws Exception { return ensureHiveDbExistence ( dbName , client ) ; } } ) ; } catch ( ExecutionException ee ) { throw new IOException ( "Database existence checking throwing execution exception." ) ; } return retVal ; } else { return this . ensureHiveDbExistence ( dbName , client ) ; } }
@return true if the db is successfully created.
false if the db already exists.
@throws IOException