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

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

                Author: ASF GitHub Bot
            Created on: 31/May/24 21:21
            Start Date: 31/May/24 21:21
    Worklog Time Spent: 10m 
      Work Description: Will-Lo commented on code in PR #3955:
URL: https://github.com/apache/gobblin/pull/3955#discussion_r1622960214


##########
gobblin-data-management/src/test/java/org/apache/gobblin/data/management/dataset/ManifestBasedDatasetFinderTest.java:
##########
@@ -173,6 +174,34 @@ public void testIgnoreFilesWithSamePermissions() throws 
IOException, URISyntaxEx
     }
   }
 
+  @Test
+  public void testFindDatasetEmptyRoot() throws Exception {
+    //Get manifest Path
+    String manifestLocation = 
getClass().getClassLoader().getResource("manifestBasedDistcpTest/manifestRootDirEmpty.json").getPath();
+
+    // Test manifestDatasetFinder
+    Properties props = new Properties();
+    props.setProperty("gobblin.copy.manifestBased.manifest.location", 
manifestLocation);
+    props.setProperty(ConfigurationKeys.DATA_PUBLISHER_FINAL_DIR, "/");
+    ManifestBasedDatasetFinder finder = new 
ManifestBasedDatasetFinder(localFs, props);
+    List<ManifestBasedDataset> datasets = finder.findDatasets();
+    Assert.assertEquals(datasets.size(), 1);
+    try (
+        FileSystem sourceFs = Mockito.mock(FileSystem.class);

Review Comment:
   No because it's try with resources 
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html





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

    Worklog Id:     (was: 921591)
    Time Spent: 50m  (was: 40m)

> Permission mismatch in manifest distcp where empty folders are copied
> ---------------------------------------------------------------------
>
>                 Key: GOBBLIN-2072
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2072
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-core
>            Reporter: William Lo
>            Assignee: Abhishek Tiwari
>            Priority: Minor
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> In Manifest distcp, empty folders are being set with the incorrect 
> permissions in SetPermissionStep after being correctly set in the 
> CopyDataPublisher.
> The suspected reason is that the folders themselves are being treated as 
> ancestors, and this causes the permission checking of the source and 
> destination ancestors to act incorrectly. TODO: We should consolidate our 
> permission comparison and logic given that there are a multitude of different 
> implementations and they each seem to have their own quirks.
> Correct CopyDataPublisher:
> {code:java}
> Setting destination directory hdfs://cluster/a/b/c owner and permission to 
> rwxr-x---{code}
> Incorrect permission commit step:
> {code:java}
> [Azkaban] Setting permission rwxr-xr-x on path /a/b/c{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to