vihangk1 commented on a change in pull request #2094:
URL: https://github.com/apache/hive/pull/2094#discussion_r600862728
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -695,7 +695,8 @@ public Database transformDatabase(Database db, List<String>
processorCapabilitie
if (!isTenantBasedStorage) {
Path locationPath = Path.getPathWithoutSchemeAndAuthority(new
Path(db.getLocationUri()));
Path whRootPath =
Path.getPathWithoutSchemeAndAuthority(hmsHandler.getWh().getWhRoot());
- if (FileUtils.isSubdirectory(whRootPath.toString(),
locationPath.toString())) { // legacy path
+ LOG.debug("Comparing DB and warehouse paths warehouse={}
db.getLocationUri={}", whRootPath.toString(), locationPath.toString());
+ if (FileUtils.isSubdirectory(whRootPath.toString(),
locationPath.toString()) || locationPath.equals(whRootPath)) { // legacy path
Review comment:
Synced up with Naveen offline. I think it would be great to add a
comment here explaining when the managed Location is set and when it is not.
The patch itself looks good to me. Once we have a comment, I think we can merge
it without the need for precommit (since there is only a comment which is
added).
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]