dengzhhu653 commented on code in PR #3599: URL: https://github.com/apache/hive/pull/3599#discussion_r1211237025
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java: ########## @@ -1335,18 +1335,42 @@ private void create_database_core(RawStore ms, final Database db) } @Override + @Deprecated public void create_database(final Database db) throws AlreadyExistsException, InvalidObjectException, MetaException { - startFunction("create_database", ": " + db.toString()); + CreateDatabaseRequest req = new CreateDatabaseRequest(db.getName()); + req.setDescription(db.getDescription()); + req.setLocationUri(db.getLocationUri()); + req.setParameters(db.getParameters()); + req.setPrivileges(db.getPrivileges()); + req.setOwnerName(db.getOwnerName()); + req.setOwnerType(db.getOwnerType()); + req.setCatalogName(db.getCatalogName()); + req.setCreateTime(db.getCreateTime()); + req.setManagedLocationUri(db.getManagedLocationUri()); + req.setType(db.getType()); + req.setDataConnectorName(db.getConnector_name()); + req.setRemote_dbname(db.getRemote_dbname()); + + create_database_req(req); + //location and manged location might be set/changed. + db.setLocationUri(req.getLocationUri()); Review Comment: The method is declared as void, the old remote client does not expect this method to return anything, it couldn't reach out the the modified `db` unless using a get database request. I saw from the old `create_database_core` method: https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java#L1151 it doesn't reset the location after flushing `db`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org