sankarh commented on a change in pull request #588: HIVE-20968 : Support conversion of managed to external where location set was not owned by hive URL: https://github.com/apache/hive/pull/588#discussion_r273411629
########## File path: ql/src/java/org/apache/hadoop/hive/ql/parse/ReplicationSpec.java ########## @@ -437,4 +448,30 @@ public void setNeedDupCopyCheck(boolean isFirstIncPending) { // Check HIVE-21197 for more detail. this.needDupCopyCheck = isFirstIncPending; } + + public boolean isPathOwnedByHive() { + return isPathOwnedByHive; + } + + public static boolean isPathOwnedByHive(HiveConf conf, String user) { + String ownerName = conf.get(HiveConf.ConfVars.STRICT_MANAGED_TABLES_MIGRARTION_OWNER.varname, "hive"); + return (user == null || ownerName.equals(user)); + } + + public void setPathOwnedByHive(boolean pathOwnedByHive) { + isPathOwnedByHive = pathOwnedByHive; + } + + public void setPathOwnedByHive(HiveConf conf, String user) { Review comment: This method also can be moved to ReplUtils and use setPathOwnedByHive(boolean) method to set it in ReplicationSpec. Just to decouple the logic outside. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org