dengzhhu653 commented on code in PR #6717:
URL: https://github.com/apache/hive/pull/6717#discussion_r3955730743
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/handler/CreateDatabaseHandler.java:
##########
@@ -76,6 +76,11 @@ protected CreateDatabaseResult execute() throws TException,
IOException {
Map<String, String> transactionalListenersResponses =
Collections.emptyMap();
Path dbExtPath = new Path(db.getLocationUri());
Path dbMgdPath = db.getManagedLocationUri() != null ? new
Path(db.getManagedLocationUri()) : null;
+
+ // HIVE-28820: create the default managed database directory even when
MANAGEDLOCATION
+ // is not explicitly specified. Do not persist this default path into
Database.managedLocationUri.
+ Path managedPathToCreate = dbMgdPath != null ? dbMgdPath :
wh.getDefaultDatabasePath(db.getName(), false);
+ boolean explicitManagedLocation = dbMgdPath != null;
Review Comment:
can we set the
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/handler/CreateDatabaseHandler.java:
##########
@@ -76,6 +76,11 @@ protected CreateDatabaseResult execute() throws TException,
IOException {
Map<String, String> transactionalListenersResponses =
Collections.emptyMap();
Path dbExtPath = new Path(db.getLocationUri());
Path dbMgdPath = db.getManagedLocationUri() != null ? new
Path(db.getManagedLocationUri()) : null;
+
+ // HIVE-28820: create the default managed database directory even when
MANAGEDLOCATION
+ // is not explicitly specified. Do not persist this default path into
Database.managedLocationUri.
+ Path managedPathToCreate = dbMgdPath != null ? dbMgdPath :
wh.getDefaultDatabasePath(db.getName(), false);
+ boolean explicitManagedLocation = dbMgdPath != null;
Review Comment:
can we set the
--
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]