[ 
https://issues.apache.org/jira/browse/GOBBLIN-1602?focusedWorklogId=722322&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-722322
 ]

ASF GitHub Bot logged work on GOBBLIN-1602:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Feb/22 21:10
            Start Date: 07/Feb/22 21:10
    Worklog Time Spent: 10m 
      Work Description: Will-Lo commented on a change in pull request #3459:
URL: https://github.com/apache/gobblin/pull/3459#discussion_r801060516



##########
File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveUtils.java
##########
@@ -167,4 +169,19 @@ private static Configuration getHadoopConfiguration() {
   public static boolean isPartitioned(Table table) {
     return table.isPartitioned();
   }
+
+  /**
+   * @param fs User configured filesystem of the target table
+   * @param userSpecifiedPath user specified path of the copy table location 
or partition
+   * @param existingTablePath path of an already registered Hive table or 
partition
+   * @return true if the filesystem resolves them to be equivalent, false 
otherwise
+   */
+  public static boolean areTablePathsEquivalent(FileSystem fs, Path 
userSpecifiedPath, Path existingTablePath) throws IOException {
+    try {
+      return 
fs.resolvePath(existingTablePath).equals(fs.resolvePath(userSpecifiedPath));

Review comment:
       Yes in the scenario where there are mixed filesystems, the only passing 
case will be when the user specifies a virtual filesystem instead of the 
physical one. But once that is done then it should pass as expected due to 
`resolvePath()`




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 722322)
    Time Spent: 3h  (was: 2h 50m)

> Handle hive table mismatch when paths are equivalent in the underlying FS
> -------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1602
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1602
>             Project: Apache Gobblin
>          Issue Type: Task
>          Components: gobblin-core
>            Reporter: William Lo
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> In scenarios where the paths are equivalent in the underlying FS, hive copy 
> should not treat these paths separately if the user provided URI does not 
> match the hive registered URI



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to