You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by el...@apache.org on 2012/11/13 02:29:52 UTC
svn commit: r1408533 -
/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java
Author: eli
Date: Tue Nov 13 01:29:51 2012
New Revision: 1408533
URL: http://svn.apache.org/viewvc?rev=1408533&view=rev
Log:
HDFS-1322. Document umask in DistributedFileSystem#mkdirs javadocs. Contributed by Colin Patrick McCabe
Modified:
hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java?rev=1408533&r1=1408532&r2=1408533&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java (original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/FsPermission.java Tue Nov 13 01:29:51 2012
@@ -184,7 +184,18 @@ public class FsPermission implements Wri
return str;
}
- /** Apply a umask to this permission and return a new one */
+ /**
+ * Apply a umask to this permission and return a new one.
+ *
+ * The umask is used by create, mkdir, and other Hadoop filesystem operations.
+ * The mode argument for these operations is modified by removing the bits
+ * which are set in the umask. Thus, the umask limits the permissions which
+ * newly created files and directories get.
+ *
+ * @param umask The umask to use
+ *
+ * @return The effective permission
+ */
public FsPermission applyUMask(FsPermission umask) {
return new FsPermission(useraction.and(umask.useraction.not()),
groupaction.and(umask.groupaction.not()),