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 cn...@apache.org on 2013/12/12 22:47:47 UTC
svn commit: r1550544 - in
/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src:
main/java/org/apache/hadoop/fs/ main/java/org/apache/hadoop/fs/permission/
main/java/org/apache/hadoop/fs/viewfs/ test/java/org/apache/hadoop/fs/
Author: cnauroth
Date: Thu Dec 12 21:47:46 2013
New Revision: 1550544
URL: http://svn.apache.org/r1550544
Log:
HDFS-5596. Implement RPC stubs. Contributed by Haohui Mai.
Modified:
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryScope.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryType.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclStatus.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFileSystem.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystem.java
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java Thu Dec 12 21:47:46 2013
@@ -2278,7 +2278,8 @@ public abstract class FileSystem extends
* @param aclSpec List<AclEntry> describing modifications
* @throws IOException if an ACL could not be modified
*/
- public void modifyAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void modifyAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support modifyAclEntries");
}
@@ -2291,7 +2292,8 @@ public abstract class FileSystem extends
* @param aclSpec List<AclEntry> describing entries to remove
* @throws IOException if an ACL could not be modified
*/
- public void removeAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void removeAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support removeAclEntries");
}
@@ -2331,7 +2333,7 @@ public abstract class FileSystem extends
* for user, group, and others for compatibility with permission bits.
* @throws IOException if an ACL could not be modified
*/
- public void setAcl(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {
throw new UnsupportedOperationException(getClass().getSimpleName()
+ " doesn't support setAcl");
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java Thu Dec 12 21:47:46 2013
@@ -22,6 +22,7 @@ import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.EnumSet;
+import java.util.List;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
@@ -512,29 +513,29 @@ public class FilterFileSystem extends Fi
}
@Override
- public void modifyAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void modifyAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
fs.modifyAclEntries(path, aclSpec);
}
@Override
- public void removeAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void removeAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
fs.removeAclEntries(path, aclSpec);
}
@Override
- public void removeDefaultAcl(Path path)
- throws IOException {
+ public void removeDefaultAcl(Path path) throws IOException {
fs.removeDefaultAcl(path);
}
@Override
- public void removeAcl(Path path)
- throws IOException {
+ public void removeAcl(Path path) throws IOException {
fs.removeAcl(path);
}
@Override
- public void setAcl(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {
fs.setAcl(path, aclSpec);
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryScope.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryScope.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryScope.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryScope.java Thu Dec 12 21:47:46 2013
@@ -38,5 +38,5 @@ public enum AclEntryScope {
* entry is not inspected as part of permission enforcement on the directory
* that owns it.
*/
- DEFAULT
+ DEFAULT;
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryType.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryType.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryType.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntryType.java Thu Dec 12 21:47:46 2013
@@ -54,5 +54,5 @@ public enum AclEntryType {
* An ACL entry that applies to all other users that were not covered by one
* of the more specific ACL entry types.
*/
- OTHER
+ OTHER;
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclStatus.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclStatus.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclStatus.java Thu Dec 12 21:47:46 2013
@@ -36,7 +36,7 @@ public class AclStatus {
private final String owner;
private final String group;
private final boolean stickyBit;
- private final Iterable<AclEntry> entries;
+ private final List<AclEntry> entries;
/**
* Returns the file owner.
@@ -68,9 +68,9 @@ public class AclStatus {
/**
* Returns the list of all ACL entries, ordered by their natural ordering.
*
- * @return Iterable<AclEntry> unmodifiable ordered list of all ACL entries
+ * @return List<AclEntry> unmodifiable ordered list of all ACL entries
*/
- public Iterable<AclEntry> getEntries() {
+ public List<AclEntry> getEntries() {
return entries;
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFileSystem.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFileSystem.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ChRootedFileSystem.java Thu Dec 12 21:47:46 2013
@@ -20,6 +20,7 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.util.EnumSet;
+import java.util.List;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
@@ -279,31 +280,31 @@ class ChRootedFileSystem extends FilterF
throws IOException {
super.setTimes(fullPath(f), mtime, atime);
}
-
+
@Override
- public void modifyAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void modifyAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
super.modifyAclEntries(fullPath(path), aclSpec);
}
@Override
- public void removeAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void removeAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
super.removeAclEntries(fullPath(path), aclSpec);
}
@Override
- public void removeDefaultAcl(Path path)
- throws IOException {
+ public void removeDefaultAcl(Path path) throws IOException {
super.removeDefaultAcl(fullPath(path));
}
@Override
- public void removeAcl(Path path)
- throws IOException {
+ public void removeAcl(Path path) throws IOException {
super.removeAcl(fullPath(path));
}
@Override
- public void setAcl(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {
super.setAcl(fullPath(path), aclSpec);
}
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java Thu Dec 12 21:47:46 2013
@@ -474,16 +474,18 @@ public class ViewFileSystem extends File
}
@Override
- public void modifyAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
- InodeTree.ResolveResult<FileSystem> res =
- fsState.resolve(getUriPath(path), true);
+ public void modifyAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
+ InodeTree.ResolveResult<FileSystem> res = fsState.resolve(getUriPath(path),
+ true);
res.targetFileSystem.modifyAclEntries(res.remainingPath, aclSpec);
}
@Override
- public void removeAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException {
- InodeTree.ResolveResult<FileSystem> res =
- fsState.resolve(getUriPath(path), true);
+ public void removeAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException {
+ InodeTree.ResolveResult<FileSystem> res = fsState.resolve(getUriPath(path),
+ true);
res.targetFileSystem.removeAclEntries(res.remainingPath, aclSpec);
}
@@ -504,7 +506,7 @@ public class ViewFileSystem extends File
}
@Override
- public void setAcl(Path path, Iterable<AclEntry> aclSpec) throws IOException {
+ public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {
InodeTree.ResolveResult<FileSystem> res =
fsState.resolve(getUriPath(path), true);
res.targetFileSystem.setAcl(res.remainingPath, aclSpec);
Modified: hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystem.java?rev=1550544&r1=1550543&r2=1550544&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystem.java (original)
+++ hadoop/common/branches/HDFS-4685/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestHarFileSystem.java Thu Dec 12 21:47:46 2013
@@ -35,6 +35,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.EnumSet;
import java.util.Iterator;
+import java.util.List;
import static org.apache.hadoop.fs.Options.ChecksumOpt;
import static org.apache.hadoop.fs.Options.CreateOpts;
@@ -167,11 +168,19 @@ public class TestHarFileSystem {
String snapshotNewName) throws IOException;
public void deleteSnapshot(Path path, String snapshotName)
throws IOException;
- public void modifyAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException;
- public void removeAclEntries(Path path, Iterable<AclEntry> aclSpec) throws IOException;
+
+ public void modifyAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException;
+
+ public void removeAclEntries(Path path, List<AclEntry> aclSpec)
+ throws IOException;
+
public void removeDefaultAcl(Path path) throws IOException;
+
public void removeAcl(Path path) throws IOException;
- public void setAcl(Path path, Iterable<AclEntry> aclSpec) throws IOException;
+
+ public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException;
+
public AclStatus getAclStatus(Path path) throws IOException;
}