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

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

                Author: ASF GitHub Bot
            Created on: 03/May/23 07:54
            Start Date: 03/May/23 07:54
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3686:
URL: https://github.com/apache/gobblin/pull/3686#discussion_r1183348834


##########
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/CopyableFile.java:
##########
@@ -375,6 +379,35 @@ public static List<OwnerAndPermission> 
resolveReplicatedOwnerAndPermissionsRecur
     return ownerAndPermissions;
   }
 
+  /**
+   * Compute the correct {@link OwnerAndPermission} obtained from replicating 
source owner and permissions and applying
+   * the {@link PreserveAttributes} rules for fromPath and every ancestor up 
to but excluding toPath.
+   * Use permissionMap as a cache to reduce the call to hdfs
+   *
+   * @return A list of the computed {@link OwnerAndPermission}s starting from 
fromPath, up to but excluding toPath.
+   * @throws IOException if toPath is not an ancestor of fromPath.
+   */
+  public static List<OwnerAndPermission> 
resolveReplicatedOwnerAndPermissionsRecursivelyWithCache(FileSystem sourceFs, 
Path fromPath,
+      Path toPath, CopyConfiguration copyConfiguration, Cache<String, 
OwnerAndPermission> permissionMap)

Review Comment:
   I won't strongly suggest refactoring these into a single impl, but I do 
highly recommend you either add a TODO about doing that later or else provide a 
javadoc comment describing how the two relate and who should use each.
   
   BTW, from your reply above about backward compatibility, I almost wonder 
whether your stance is that the existing method should get `@Deprecated`





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

    Worklog Id:     (was: 860235)
    Time Spent: 2h  (was: 1h 50m)

> Improving the Efficiency of Work Planning in Manifest-Based DistCp Jobs
> -----------------------------------------------------------------------
>
>                 Key: GOBBLIN-1824
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1824
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Optimizing Permission Calculation and Introducing Multithreading in 
> Manifest-Based DistCp Work Planning



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

Reply via email to