{"action":"created","comment":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/67716899","id":67716899,"diff_hunk":"@@ -0,0 +1,92 @@\n+/*\n+ * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n+ * (the \"License\"). You may not use this work except in compliance with the License, which is\n+ * available at www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n+ * either express or implied, as more fully set forth in the License.\n+ *\n+ * See the NOTICE file distributed with this work for information regarding copyright ownership.\n+ */\n+\n+package alluxio.underfs.options;\n+\n+import alluxio.Configuration;\n+import alluxio.annotation.PublicApi;\n+import alluxio.security.authorization.PermissionStatus;\n+\n+import javax.annotation.concurrent.NotThreadSafe;\n+\n+/**\n+ * Method options for mkdirs in UnderFileSystem.\n+ */\n+@PublicApi\n+@NotThreadSafe\n+public final class UnderFileSystemMkdirsOptions {\n+  // Permission status to set for the directories being created.\n+  private PermissionStatus mPermissionStatus;\n+  // Determine whether to create any necessary but nonexistent parent directories.\n+  private boolean mCreateParent;\n+\n+  /**\n+   * @return the default {@link UnderFileSystemMkdirsOptions}\n+   */\n+  public static UnderFileSystemMkdirsOptions defaults() {\n+    return new UnderFileSystemMkdirsOptions();\n+  }\n+\n+  private UnderFileSystemMkdirsOptions() {\n+    mPermissionStatus = PermissionStatus.defaults();\n+    // By default create parent is true.\n+    mCreateParent = true;\n+  }\n+\n+  /**\n+   * Constructs a {@link UnderFileSystemMkdirsOptions} with specified configuration.\n+   *\n+   * @param conf the configuration\n+   */\n+  public UnderFileSystemMkdirsOptions(Configuration conf) {\n+    // Only set the permission, not the owner/group because owner/group is not yet used for UFS\n+    // directories creation.\n+    mPermissionStatus = PermissionStatus.defaults().applyDirectoryUMask(conf);\n+    // By default create parent is true.\n+    mCreateParent = true;","path":"core/common/src/main/java/alluxio/underfs/options/UnderFileSystemMkdirsOptions.java","position":54,"original_position":54,"commit_id":"907acc890f8165341757dacccbfdf7bdfa1c471e","original_commit_id":"907acc890f8165341757dacccbfdf7bdfa1c471e","user":{"login":"jsimsa","id":1072079,"avatar_url":"https://avatars.githubusercontent.com/u/1072079?v=3","gravatar_id":"","url":"https://api.github.com/users/jsimsa","html_url":"https://github.com/jsimsa","followers_url":"https://api.github.com/users/jsimsa/followers","following_url":"https://api.github.com/users/jsimsa/following{/other_user}","gists_url":"https://api.github.com/users/jsimsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jsimsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsimsa/subscriptions","organizations_url":"https://api.github.com/users/jsimsa/orgs","repos_url":"https://api.github.com/users/jsimsa/repos","events_url":"https://api.github.com/users/jsimsa/events{/privacy}","received_events_url":"https://api.github.com/users/jsimsa/received_events","type":"User","site_admin":false},"body":"ditto","created_at":"2016-06-20T16:06:00Z","updated_at":"2016-06-20T16:06:00Z","html_url":"https://github.com/Alluxio/alluxio/pull/3560#discussion_r67716899","pull_request_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560","_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments/67716899"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/3560#discussion_r67716899"},"pull_request":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560"}}},"pull_request":{"url":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560","id":74311601,"html_url":"https://github.com/Alluxio/alluxio/pull/3560","diff_url":"https://github.com/Alluxio/alluxio/pull/3560.diff","patch_url":"https://github.com/Alluxio/alluxio/pull/3560.patch","issue_url":"https://api.github.com/repos/Alluxio/alluxio/issues/3560","number":3560,"state":"open","locked":false,"title":"[WIP] [ALLUXIO-2021] Keep Alluxio and UFS (local&hdfs) files user/group/permission in sync","user":{"login":"ifcharming","id":4342151,"avatar_url":"https://avatars.githubusercontent.com/u/4342151?v=3","gravatar_id":"","url":"https://api.github.com/users/ifcharming","html_url":"https://github.com/ifcharming","followers_url":"https://api.github.com/users/ifcharming/followers","following_url":"https://api.github.com/users/ifcharming/following{/other_user}","gists_url":"https://api.github.com/users/ifcharming/gists{/gist_id}","starred_url":"https://api.github.com/users/ifcharming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifcharming/subscriptions","organizations_url":"https://api.github.com/users/ifcharming/orgs","repos_url":"https://api.github.com/users/ifcharming/repos","events_url":"https://api.github.com/users/ifcharming/events{/privacy}","received_events_url":"https://api.github.com/users/ifcharming/received_events","type":"User","site_admin":false},"body":"Addresses https://alluxio.atlassian.net/browse/ALLUXIO-2021\r\n\r\nThis PR:\r\n- Adds new Set and Get user/group/permission in UFS interface.\r\n- Implements user/group/permission propagation for local and HDFS. Not supported for Object storages.\r\n- Create and complete UFS files now supports specifying the `PermissionStatus`\r\n- When UFS delegation (decoupling) is turned on, permission is added to the thrift API. Therefore, worker would be able to know the end-user identify and permission to set for the file being created.\r\n- Add `permissionStatus` in `persistFile` to propagate Alluxio ACL to UFS.\r\n- Make `loadMetadata` (for both dir and files) load UFS ACL to Alluxio namespace.\r\n- chown/chgrp/chmod ops are propagated to UFS if the Alluxio file is persisted\r\n\r\nTested locally with \r\n- different UFSs: Local, HDFS, secure HDFS\r\n- `alluxio.user.ufs.delegation.enabled` on/off \r\n\r\nWIP with the following TODOs:\r\n- Fix temporarily disabled integration tests, because the ACL change in UFS not supported in integration framework yet.\r\n- Add more unit test coverage\r\n- Add integration test for ACL sync between Alluxio and UFS.\r\n","created_at":"2016-06-17T22:04:51Z","updated_at":"2016-06-20T16:06:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f89315f6007c129771437788adba11118f7c13f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560/commits","review_comments_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560/comments","review_comment_url":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/issues/3560/comments","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/907acc890f8165341757dacccbfdf7bdfa1c471e","head":{"label":"ifcharming:add-user-in-options","ref":"add-user-in-options","sha":"907acc890f8165341757dacccbfdf7bdfa1c471e","user":{"login":"ifcharming","id":4342151,"avatar_url":"https://avatars.githubusercontent.com/u/4342151?v=3","gravatar_id":"","url":"https://api.github.com/users/ifcharming","html_url":"https://github.com/ifcharming","followers_url":"https://api.github.com/users/ifcharming/followers","following_url":"https://api.github.com/users/ifcharming/following{/other_user}","gists_url":"https://api.github.com/users/ifcharming/gists{/gist_id}","starred_url":"https://api.github.com/users/ifcharming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifcharming/subscriptions","organizations_url":"https://api.github.com/users/ifcharming/orgs","repos_url":"https://api.github.com/users/ifcharming/repos","events_url":"https://api.github.com/users/ifcharming/events{/privacy}","received_events_url":"https://api.github.com/users/ifcharming/received_events","type":"User","site_admin":false},"repo":{"id":50484991,"name":"tachyon","full_name":"ifcharming/tachyon","owner":{"login":"ifcharming","id":4342151,"avatar_url":"https://avatars.githubusercontent.com/u/4342151?v=3","gravatar_id":"","url":"https://api.github.com/users/ifcharming","html_url":"https://github.com/ifcharming","followers_url":"https://api.github.com/users/ifcharming/followers","following_url":"https://api.github.com/users/ifcharming/following{/other_user}","gists_url":"https://api.github.com/users/ifcharming/gists{/gist_id}","starred_url":"https://api.github.com/users/ifcharming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifcharming/subscriptions","organizations_url":"https://api.github.com/users/ifcharming/orgs","repos_url":"https://api.github.com/users/ifcharming/repos","events_url":"https://api.github.com/users/ifcharming/events{/privacy}","received_events_url":"https://api.github.com/users/ifcharming/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ifcharming/tachyon","description":"Memory Centric Reliable Distributed Storage","fork":true,"url":"https://api.github.com/repos/ifcharming/tachyon","forks_url":"https://api.github.com/repos/ifcharming/tachyon/forks","keys_url":"https://api.github.com/repos/ifcharming/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ifcharming/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ifcharming/tachyon/teams","hooks_url":"https://api.github.com/repos/ifcharming/tachyon/hooks","issue_events_url":"https://api.github.com/repos/ifcharming/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/ifcharming/tachyon/events","assignees_url":"https://api.github.com/repos/ifcharming/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/ifcharming/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/ifcharming/tachyon/tags","blobs_url":"https://api.github.com/repos/ifcharming/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ifcharming/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ifcharming/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/ifcharming/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ifcharming/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/ifcharming/tachyon/languages","stargazers_url":"https://api.github.com/repos/ifcharming/tachyon/stargazers","contributors_url":"https://api.github.com/repos/ifcharming/tachyon/contributors","subscribers_url":"https://api.github.com/repos/ifcharming/tachyon/subscribers","subscription_url":"https://api.github.com/repos/ifcharming/tachyon/subscription","commits_url":"https://api.github.com/repos/ifcharming/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/ifcharming/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/ifcharming/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/ifcharming/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/ifcharming/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/ifcharming/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ifcharming/tachyon/merges","archive_url":"https://api.github.com/repos/ifcharming/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ifcharming/tachyon/downloads","issues_url":"https://api.github.com/repos/ifcharming/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/ifcharming/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/ifcharming/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/ifcharming/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ifcharming/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/ifcharming/tachyon/releases{/id}","deployments_url":"https://api.github.com/repos/ifcharming/tachyon/deployments","created_at":"2016-01-27T05:50:36Z","updated_at":"2016-01-27T05:50:40Z","pushed_at":"2016-06-18T23:11:15Z","git_url":"git://github.com/ifcharming/tachyon.git","ssh_url":"git@github.com:ifcharming/tachyon.git","clone_url":"https://github.com/ifcharming/tachyon.git","svn_url":"https://github.com/ifcharming/tachyon","homepage":"http://tachyon-project.org","size":55539,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Alluxio:master","ref":"master","sha":"3f1ecba460cc38c0db0a68d48a8e2b638aa7a66f","user":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"alluxio","full_name":"Alluxio/alluxio","owner":{"login":"Alluxio","id":16203694,"avatar_url":"https://avatars.githubusercontent.com/u/16203694?v=3","gravatar_id":"","url":"https://api.github.com/users/Alluxio","html_url":"https://github.com/Alluxio","followers_url":"https://api.github.com/users/Alluxio/followers","following_url":"https://api.github.com/users/Alluxio/following{/other_user}","gists_url":"https://api.github.com/users/Alluxio/gists{/gist_id}","starred_url":"https://api.github.com/users/Alluxio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alluxio/subscriptions","organizations_url":"https://api.github.com/users/Alluxio/orgs","repos_url":"https://api.github.com/users/Alluxio/repos","events_url":"https://api.github.com/users/Alluxio/events{/privacy}","received_events_url":"https://api.github.com/users/Alluxio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alluxio/alluxio","description":"Alluxio, formerly Tachyon, Memory Speed Virtual Distributed Storage System","fork":false,"url":"https://api.github.com/repos/Alluxio/alluxio","forks_url":"https://api.github.com/repos/Alluxio/alluxio/forks","keys_url":"https://api.github.com/repos/Alluxio/alluxio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alluxio/alluxio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alluxio/alluxio/teams","hooks_url":"https://api.github.com/repos/Alluxio/alluxio/hooks","issue_events_url":"https://api.github.com/repos/Alluxio/alluxio/issues/events{/number}","events_url":"https://api.github.com/repos/Alluxio/alluxio/events","assignees_url":"https://api.github.com/repos/Alluxio/alluxio/assignees{/user}","branches_url":"https://api.github.com/repos/Alluxio/alluxio/branches{/branch}","tags_url":"https://api.github.com/repos/Alluxio/alluxio/tags","blobs_url":"https://api.github.com/repos/Alluxio/alluxio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alluxio/alluxio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alluxio/alluxio/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alluxio/alluxio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alluxio/alluxio/statuses/{sha}","languages_url":"https://api.github.com/repos/Alluxio/alluxio/languages","stargazers_url":"https://api.github.com/repos/Alluxio/alluxio/stargazers","contributors_url":"https://api.github.com/repos/Alluxio/alluxio/contributors","subscribers_url":"https://api.github.com/repos/Alluxio/alluxio/subscribers","subscription_url":"https://api.github.com/repos/Alluxio/alluxio/subscription","commits_url":"https://api.github.com/repos/Alluxio/alluxio/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alluxio/alluxio/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alluxio/alluxio/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alluxio/alluxio/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alluxio/alluxio/contents/{+path}","compare_url":"https://api.github.com/repos/Alluxio/alluxio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alluxio/alluxio/merges","archive_url":"https://api.github.com/repos/Alluxio/alluxio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alluxio/alluxio/downloads","issues_url":"https://api.github.com/repos/Alluxio/alluxio/issues{/number}","pulls_url":"https://api.github.com/repos/Alluxio/alluxio/pulls{/number}","milestones_url":"https://api.github.com/repos/Alluxio/alluxio/milestones{/number}","notifications_url":"https://api.github.com/repos/Alluxio/alluxio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alluxio/alluxio/labels{/name}","releases_url":"https://api.github.com/repos/Alluxio/alluxio/releases{/id}","deployments_url":"https://api.github.com/repos/Alluxio/alluxio/deployments","created_at":"2012-12-21T17:43:46Z","updated_at":"2016-06-20T00:37:13Z","pushed_at":"2016-06-20T09:47:43Z","git_url":"git://github.com/Alluxio/alluxio.git","ssh_url":"git@github.com:Alluxio/alluxio.git","clone_url":"https://github.com/Alluxio/alluxio.git","svn_url":"https://github.com/Alluxio/alluxio","homepage":"http://www.alluxio.org/","size":87016,"stargazers_count":2413,"watchers_count":2413,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":999,"mirror_url":null,"open_issues_count":21,"forks":999,"open_issues":21,"watchers":2413,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560"},"html":{"href":"https://github.com/Alluxio/alluxio/pull/3560"},"issue":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/3560"},"comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/issues/3560/comments"},"review_comments":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560/comments"},"review_comment":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alluxio/alluxio/pulls/3560/commits"},"statuses":{"href":"https://api.github.com/repos/Alluxio/alluxio/statuses/907acc890f8165341757dacccbfdf7bdfa1c471e"}}}}
{"actor":{"display_login":"jsimsa"}}