You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/28 13:47:36 UTC
[GitHub] [hive] ayushtkn opened a new pull request #1925: HIVE-24698. Sync ACL's for the table directory during external table replication.
ayushtkn opened a new pull request #1925:
URL: https://github.com/apache/hive/pull/1925
https://issues.apache.org/jira/browse/HIVE-24698
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] ayushtkn commented on a change in pull request #1925: HIVE-24698. Sync ACL's for the table directory during external table replication.
Posted by GitBox <gi...@apache.org>.
ayushtkn commented on a change in pull request #1925:
URL: https://github.com/apache/hive/pull/1925#discussion_r571923493
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/DirCopyTask.java
##########
@@ -70,9 +76,40 @@ private boolean createAndSetPathOwner(Path destPath, Path sourcePath) throws IOE
destPath, sourcePath, status.getOwner(), status.getGroup(), status.getPermission());
destPath.getFileSystem(conf).setOwner(destPath, status.getOwner(), status.getGroup());
destPath.getFileSystem(conf).setPermission(destPath, status.getPermission());
+ setAclsToTarget(status, sourcePath, destPath);
return createdDir;
}
+ private void setAclsToTarget(FileStatus sourceStatus, Path sourcePath,
+ Path destPath) throws IOException {
+ // Check if distCp options contains preserve ACL.
+ if (isPreserveAcl()) {
+ AclStatus sourceAcls =
+ sourcePath.getFileSystem(conf).getAclStatus(sourcePath);
+ if (sourceAcls != null && sourceAcls.getEntries().size() > 0) {
+ destPath.getFileSystem(conf).removeAcl(destPath);
Review comment:
I followed the same semantics as DistCp, DistCp also does removeAcl first, added as part of HADOOP-16032.
The reason being if the directory at the target has ACCESS scope ACL and the directory at source has only Default ACL, so setAcl will not remove the ACCESS scope ACL, hence the ACL's on source & dest won't be same. So, to counter that removeACl is called first.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] ayushtkn commented on pull request #1925: HIVE-24698. Sync ACL's for the table directory during external table replication.
Posted by GitBox <gi...@apache.org>.
ayushtkn commented on pull request #1925:
URL: https://github.com/apache/hive/pull/1925#issuecomment-775103259
Thanx Aasha for the review.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] aasha merged pull request #1925: HIVE-24698. Sync ACL's for the table directory during external table replication.
Posted by GitBox <gi...@apache.org>.
aasha merged pull request #1925:
URL: https://github.com/apache/hive/pull/1925
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
[GitHub] [hive] aasha commented on a change in pull request #1925: HIVE-24698. Sync ACL's for the table directory during external table replication.
Posted by GitBox <gi...@apache.org>.
aasha commented on a change in pull request #1925:
URL: https://github.com/apache/hive/pull/1925#discussion_r571813927
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/DirCopyTask.java
##########
@@ -70,9 +76,40 @@ private boolean createAndSetPathOwner(Path destPath, Path sourcePath) throws IOE
destPath, sourcePath, status.getOwner(), status.getGroup(), status.getPermission());
destPath.getFileSystem(conf).setOwner(destPath, status.getOwner(), status.getGroup());
destPath.getFileSystem(conf).setPermission(destPath, status.getPermission());
+ setAclsToTarget(status, sourcePath, destPath);
return createdDir;
}
+ private void setAclsToTarget(FileStatus sourceStatus, Path sourcePath,
+ Path destPath) throws IOException {
+ // Check if distCp options contains preserve ACL.
+ if (isPreserveAcl()) {
+ AclStatus sourceAcls =
+ sourcePath.getFileSystem(conf).getAclStatus(sourcePath);
+ if (sourceAcls != null && sourceAcls.getEntries().size() > 0) {
+ destPath.getFileSystem(conf).removeAcl(destPath);
Review comment:
why is this call needed?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org