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

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

                Author: ASF GitHub Bot
            Created on: 07/Feb/22 01:03
            Start Date: 07/Feb/22 01:03
    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_r800261351



##########
File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveCopyEntityHelper.java
##########
@@ -750,9 +751,14 @@ else if (desiredTargetExistingPaths.size() > 0) {
 
   private void checkPartitionedTableCompatibility(Table desiredTargetTable, 
Table existingTargetTable)
       throws IOException {
-    if 
(!desiredTargetTable.getDataLocation().equals(existingTargetTable.getDataLocation()))
 {
-      throw new 
HiveTableLocationNotMatchException(desiredTargetTable.getDataLocation(),
-          existingTargetTable.getDataLocation());
+    try {
+      if (!this.targetFs.resolvePath(desiredTargetTable.getDataLocation())
+          
.equals(this.targetFs.resolvePath(existingTargetTable.getDataLocation()))) {
+        throw new 
HiveTableLocationNotMatchException(desiredTargetTable.getDataLocation(), 
existingTargetTable.getDataLocation());

Review comment:
       I think a scenario where the paths match exactly but fail when using 
`resolvePath()` should never happen, since resolvePath in this scenario would 
just be validating their FS is equivalent (logical vs physical paths). If it 
fails the `resolvePath()`, there should still be some noticeable difference in 
the paths such that the user can discern some sort of meaning.




-- 
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: 721719)
    Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  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