[ https://issues.apache.org/jira/browse/HIVE-26012?focusedWorklogId=820780&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-820780 ]
ASF GitHub Bot logged work on HIVE-26012: ----------------------------------------- Author: ASF GitHub Bot Created on: 27/Oct/22 00:57 Start Date: 27/Oct/22 00:57 Worklog Time Spent: 10m Work Description: DanielZhu58 opened a new pull request, #3477: URL: https://github.com/apache/hive/pull/3477 ### What changes were proposed in this pull request? Change the CreateDatabaseRequest struct, to add a boolean value skipFSWrites. This boolean value decides whether to create the directory of this database in file system or not. Same as CreateTableRequest struct and AddPartitionsRequest struct. Meanwhile, enhance the HMS API to accept additional boolean skipFSWrites parameters to skip the creation on a need-to basis. ### Why are the changes needed? The following DDL statements in hive result in creation of a directories on the DFS filesystem. "create database", "create table", "alter table 'table_name' add partition" This is done to ensure that the user (be it be the service user or end user) has the privileges to access the underlying filesystem location. But it also sets up the subsequent queries from not having the burden of creating the directories “on demand”. For example, having the execution for “create table” statement also create the database root directories would be a little out of place. Making this change can let the users to skip the creation on a need-to basis. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit tests, Thrift build, Maven build Issue Time Tracking ------------------- Worklog Id: (was: 820780) Time Spent: 5h 50m (was: 5h 40m) > HMS APIs to be enhanced for metadata replication > ------------------------------------------------ > > Key: HIVE-26012 > URL: https://issues.apache.org/jira/browse/HIVE-26012 > Project: Hive > Issue Type: Improvement > Components: Metastore > Affects Versions: 3.1.0 > Reporter: Naveen Gangam > Assignee: Hongdan Zhu > Priority: Major > Labels: pull-request-available > Attachments: HMS APIs to be enhanced for metadata replication.docx > > Time Spent: 5h 50m > Remaining Estimate: 0h > > HMS currently has APIs like these that automatically create/delete the > directories on the associated DFS. > [create/drop]_database > [create/drop]_table* > [add/append/drop]_partition* > This is expected and should be this way when query processors use this APIs. > However, when tools that replicate hive metadata use this APIs on the target > cluster, creating these dirs on target side which cause the replication of > DFS-snapshots to fail. > So we if provide an option to bypass this creation of dirs, dfs replications > will be smoother. In the future we will need to restrict users that can use > these APIs. So we will have some sort of an authorization policy. -- This message was sent by Atlassian Jira (v8.20.10#820010)