hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-26012: HMS APIs to be enhanced for metadata replication

Open DanielZhu58 opened this issue 3 years ago • 3 comments

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

DanielZhu58 avatar Jul 27 '22 01:07 DanielZhu58

also should we test renaming a table that skips creating the directory?

dengzhhu653 avatar Jul 27 '22 03:07 dengzhhu653

@DanielZhu58 - Can you post the replies for @dengzhhu653's questions? Thanks.

saihemanth-cloudera avatar Aug 10 '22 06:08 saihemanth-cloudera

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 19 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Aug 19 '22 09:08 sonarqubecloud[bot]

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Oct 19 '22 00:10 github-actions[bot]