saihemanth-cloudera commented on code in PR #3599:
URL: https://github.com/apache/hive/pull/3599#discussion_r1210841291
##########
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:
I actually thought that tests are using the `db` to assert on the location
but looks like none of the tests are doing it. My only concern is, the old
client, may be expecting a modified location that will no more be compatible
with this change. So, if we are not removing the old/deprecated APIs in this
version then it is safe to keep this or else we can remove it otherwise.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]