|
7 | 7 | import org.apache.hadoop.conf.Configuration; |
8 | 8 | import org.apache.hadoop.fs.cosn.Constants; |
9 | 9 | import org.apache.hadoop.fs.cosn.OperationCancellingStatusProvider; |
| 10 | +import org.apache.hadoop.fs.permission.AclEntry; |
| 11 | +import org.apache.hadoop.fs.permission.AclStatus; |
10 | 12 | import org.apache.hadoop.fs.permission.FsPermission; |
11 | 13 | import org.apache.hadoop.security.AccessControlException; |
12 | 14 | import org.apache.hadoop.security.UserGroupInformation; |
@@ -484,6 +486,54 @@ public void setTimes(Path p, long mtime, long atime) throws IOException { |
484 | 486 | this.actualImplFS.setTimes(p, mtime, atime); |
485 | 487 | } |
486 | 488 |
|
| 489 | + @Override |
| 490 | + public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException { |
| 491 | + LOG.debug("set acl, path: {}, aclSpec: {}", path, aclSpec); |
| 492 | + checkInitialized(); |
| 493 | + checkPermission(path, RangerAccessType.WRITE); |
| 494 | + this.actualImplFS.setAcl(path, aclSpec); |
| 495 | + } |
| 496 | + |
| 497 | + @Override |
| 498 | + public AclStatus getAclStatus(Path path) throws IOException { |
| 499 | + LOG.debug("getAclStatus, path: {}", path); |
| 500 | + checkInitialized(); |
| 501 | + checkPermission(path, RangerAccessType.READ); |
| 502 | + return this.actualImplFS.getAclStatus(path); |
| 503 | + } |
| 504 | + |
| 505 | + @Override |
| 506 | + public void modifyAclEntries(Path path, List<AclEntry> aclSpec) throws IOException { |
| 507 | + LOG.debug("modifyAclEntries, path: {}, aclSpec: {}", path, aclSpec); |
| 508 | + checkInitialized(); |
| 509 | + checkPermission(path, RangerAccessType.WRITE); |
| 510 | + this.actualImplFS.modifyAclEntries(path, aclSpec); |
| 511 | + } |
| 512 | + |
| 513 | + @Override |
| 514 | + public void removeAclEntries(Path path, List<AclEntry> aclSpec) throws IOException { |
| 515 | + LOG.debug("removeAclEntries, path: {}, aclSpec: {}", path, aclSpec); |
| 516 | + checkInitialized(); |
| 517 | + checkPermission(path, RangerAccessType.WRITE); |
| 518 | + this.actualImplFS.removeAclEntries(path, aclSpec); |
| 519 | + } |
| 520 | + |
| 521 | + @Override |
| 522 | + public void removeDefaultAcl(Path path) throws IOException { |
| 523 | + LOG.debug("removeDefaultAcl, path: {}", path); |
| 524 | + checkInitialized(); |
| 525 | + checkPermission(path, RangerAccessType.WRITE); |
| 526 | + this.actualImplFS.removeDefaultAcl(path); |
| 527 | + } |
| 528 | + |
| 529 | + @Override |
| 530 | + public void removeAcl(Path path) throws IOException { |
| 531 | + LOG.debug("removeAcl, path: {}", path); |
| 532 | + checkInitialized(); |
| 533 | + checkPermission(path, RangerAccessType.WRITE); |
| 534 | + this.actualImplFS.removeAcl(path); |
| 535 | + } |
| 536 | + |
487 | 537 | public NativeFileSystemStore getStore() { |
488 | 538 | return this.nativeStore; |
489 | 539 | } |
|
0 commit comments