[48/50] [abbrv] hadoop git commit: HDFS-13363. Record file path when FSDirAclOp throws AclException. Contributed by Gabor Bota.

2018-04-10 Thread xyao
HDFS-13363. Record file path when FSDirAclOp throws AclException. Contributed 
by Gabor Bota.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e76c2aeb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e76c2aeb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e76c2aeb

Branch: refs/heads/HDFS-7240
Commit: e76c2aeb288710ebee39680528dec44e454bbe9e
Parents: f89594f
Author: Xiao Chen 
Authored: Tue Apr 10 11:19:23 2018 -0700
Committer: Xiao Chen 
Committed: Tue Apr 10 11:19:48 2018 -0700

--
 .../org/apache/hadoop/hdfs/protocol/AclException.java   | 10 ++
 .../apache/hadoop/hdfs/server/namenode/FSDirAclOp.java  | 12 
 2 files changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e76c2aeb/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
index 1210999..9948b99 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
@@ -36,4 +36,14 @@ public class AclException extends IOException {
   public AclException(String message) {
 super(message);
   }
+
+  /**
+   * Creates a new AclException.
+   *
+   * @param message String message
+   * @param cause The cause of the exception
+   */
+  public AclException(String message, Throwable cause) {
+super(message, cause);
+  }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e76c2aeb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
index 7b3471d..8d77f89 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
@@ -53,6 +53,8 @@ class FSDirAclOp {
   existingAcl, aclSpec);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -77,6 +79,8 @@ class FSDirAclOp {
 existingAcl, aclSpec);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -100,6 +104,8 @@ class FSDirAclOp {
 existingAcl);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -117,6 +123,8 @@ class FSDirAclOp {
   src = iip.getPath();
   fsd.checkOwner(pc, iip);
   unprotectedRemoveAcl(fsd, iip);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -136,6 +144,8 @@ class FSDirAclOp {
   fsd.checkOwner(pc, iip);
   List newAcl = unprotectedSetAcl(fsd, iip, aclSpec, false);
   fsd.getEditLog().logSetAcl(iip.getPath(), newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -162,6 +172,8 @@ class FSDirAclOp {
   .stickyBit(fsPermission.getStickyBit())
   .setPermission(fsPermission)
   .addEntries(acl).build();
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.readUnlock();
 }


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



hadoop git commit: HDFS-13363. Record file path when FSDirAclOp throws AclException. Contributed by Gabor Bota.

2018-04-10 Thread xiao
Repository: hadoop
Updated Branches:
  refs/heads/trunk f89594f0b -> e76c2aeb2


HDFS-13363. Record file path when FSDirAclOp throws AclException. Contributed 
by Gabor Bota.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e76c2aeb
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e76c2aeb
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e76c2aeb

Branch: refs/heads/trunk
Commit: e76c2aeb288710ebee39680528dec44e454bbe9e
Parents: f89594f
Author: Xiao Chen 
Authored: Tue Apr 10 11:19:23 2018 -0700
Committer: Xiao Chen 
Committed: Tue Apr 10 11:19:48 2018 -0700

--
 .../org/apache/hadoop/hdfs/protocol/AclException.java   | 10 ++
 .../apache/hadoop/hdfs/server/namenode/FSDirAclOp.java  | 12 
 2 files changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e76c2aeb/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
index 1210999..9948b99 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/AclException.java
@@ -36,4 +36,14 @@ public class AclException extends IOException {
   public AclException(String message) {
 super(message);
   }
+
+  /**
+   * Creates a new AclException.
+   *
+   * @param message String message
+   * @param cause The cause of the exception
+   */
+  public AclException(String message, Throwable cause) {
+super(message, cause);
+  }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e76c2aeb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
index 7b3471d..8d77f89 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAclOp.java
@@ -53,6 +53,8 @@ class FSDirAclOp {
   existingAcl, aclSpec);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -77,6 +79,8 @@ class FSDirAclOp {
 existingAcl, aclSpec);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -100,6 +104,8 @@ class FSDirAclOp {
 existingAcl);
   AclStorage.updateINodeAcl(inode, newAcl, snapshotId);
   fsd.getEditLog().logSetAcl(src, newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -117,6 +123,8 @@ class FSDirAclOp {
   src = iip.getPath();
   fsd.checkOwner(pc, iip);
   unprotectedRemoveAcl(fsd, iip);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -136,6 +144,8 @@ class FSDirAclOp {
   fsd.checkOwner(pc, iip);
   List newAcl = unprotectedSetAcl(fsd, iip, aclSpec, false);
   fsd.getEditLog().logSetAcl(iip.getPath(), newAcl);
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.writeUnlock();
 }
@@ -162,6 +172,8 @@ class FSDirAclOp {
   .stickyBit(fsPermission.getStickyBit())
   .setPermission(fsPermission)
   .addEntries(acl).build();
+} catch (AclException e){
+  throw new AclException(e.getMessage() + " Path: " + src, e);
 } finally {
   fsd.readUnlock();
 }


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org