Will-Lo commented on code in PR #3966:
URL: https://github.com/apache/gobblin/pull/3966#discussion_r1633903207


##########
gobblin-data-management/src/main/java/org/apache/gobblin/util/commit/CreateAndSetDirectoryPermissionCommitStep.java:
##########
@@ -66,9 +68,13 @@ public void execute() throws IOException {
     for (Map.Entry<String, OwnerAndPermission> entry : 
pathAndPermissions.entrySet()) {
       Path path = new Path(entry.getKey());
       try {
-        log.info("Setting permission {} on path {}", 
entry.getValue().getFsPermission(), path);
-        fs.setPermission(path, entry.getValue().getFsPermission());
-        // TODO : we can also set owner and group here.
+        if (!fs.exists(path)) {
+          log.info("Creating path {} with permission {}", path, 
entry.getValue().getFsPermission());
+          fs.mkdirs(path, entry.getValue().getFsPermission());

Review Comment:
   It sets the owner and group when you add permissions right 
https://hadoop.apache.org/docs/r2.6.4/api/org/apache/hadoop/fs/permission/FsPermission.html



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

Reply via email to