[ https://issues.apache.org/jira/browse/HIVE-26537?focusedWorklogId=830449&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-830449 ]
ASF GitHub Bot logged work on HIVE-26537: ----------------------------------------- Author: ASF GitHub Bot Created on: 01/Dec/22 20:28 Start Date: 01/Dec/22 20:28 Worklog Time Spent: 10m Work Description: saihemanth-cloudera commented on code in PR #3599: URL: https://github.com/apache/hive/pull/3599#discussion_r1037533650 ########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java: ########## @@ -1363,18 +1363,66 @@ 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(); + req.setDatabaseName(db.getName()); + if (db.isSetDescription()) { + req.setDescription(db.getDescription()); + } + if (db.isSetLocationUri()) { + req.setLocationUri(db.getLocationUri()); + } + if (db.isSetParameters()) { + req.setParameters(db.getParameters()); + } + if (db.isSetPrivileges()) { + req.setPrivileges(db.getPrivileges()); + } + if (db.isSetOwnerName()) { + req.setOwnerName(db.getOwnerName()); + } + if (db.isSetOwnerType()) { + req.setOwnerType(db.getOwnerType()); + } + if (db.isSetCatalogName()) { + req.setCatalogName(db.getCatalogName()); + } + if (db.isSetCreateTime()) { + req.setCreateTime(db.getCreateTime()); + } + if (db.isSetManagedLocationUri()) { + req.setManagedLocationUri(db.getManagedLocationUri()); + } + if (db.isSetType()) { + req.setType(db.getType()); + } + if (db.isSetConnector_name()) { + req.setDataConnectorName(db.getConnector_name()); + } + if (db.isSetRemote_dbname()) { + req.setRemote_dbname(db.getRemote_dbname()); + } + create_database_req(req); Review Comment: Again, `create_database(final Database db)` api is a deprecated method, we don't want to do anything in this api other than re-routing it to `create_database_req(req)` api. In the next release, we would like to remove all the deprecated APIs in the thrift class. Even though it breaks the incompatibility, moving forward we'll have a clean code base. Issue Time Tracking ------------------- Worklog Id: (was: 830449) Time Spent: 4h 20m (was: 4h 10m) > Deprecate older APIs in the HMS > ------------------------------- > > Key: HIVE-26537 > URL: https://issues.apache.org/jira/browse/HIVE-26537 > Project: Hive > Issue Type: Improvement > Affects Versions: 4.0.0-alpha-1, 4.0.0-alpha-2 > Reporter: Sai Hemanth Gantasala > Assignee: Sai Hemanth Gantasala > Priority: Major > Labels: pull-request-available > Time Spent: 4h 20m > Remaining Estimate: 0h > > This Jira is to track the clean-up(deprecate older APIs and point the HMS > client to the newer APIs) work in the hive metastore server. > More details will be added here soon. -- This message was sent by Atlassian Jira (v8.20.10#820010)