Browse Source

Fixing the merge issues from the change r1102011

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/yahoo-merge@1124440 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 14 years ago
parent
commit
b84e30b041

+ 14 - 0
src/java/core-default.xml

@@ -246,6 +246,13 @@
 </property>
 
 
+<property>
+  <name>fs.viewfs.impl</name>
+  <value>org.apache.hadoop.fs.viewfs.ViewFileSystem</value>
+  <description>The FileSystem for view file system for viewfs: uris
+  (ie client side mount table:).</description>
+</property>
+
 <property>
   <name>fs.viewfs.impl</name>
   <value>org.apache.hadoop.fs.viewfs.ViewFileSystem</value>
@@ -267,6 +274,13 @@
 </property>
 
 
+<property>
+  <name>fs.AbstractFileSystem.viewfs.impl</name>
+  <value>org.apache.hadoop.fs.viewfs.ViewFs</value>
+  <description>The AbstractFileSystem for view file system for viewfs: uris
+  (ie client side mount table:).</description>
+</property>
+
 <property>
   <name>fs.AbstractFileSystem.viewfs.impl</name>
   <value>org.apache.hadoop.fs.viewfs.ViewFs</value>

+ 2 - 1
src/java/org/apache/hadoop/fs/AbstractFileSystem.java

@@ -910,11 +910,12 @@ public abstract class AbstractFileSystem {
    * 
    * @param renewer the account name that is allowed to renew the token.
    * @return List of delegation tokens.
+   *   If delegation tokens not supported then return a list of size zero.
    * @throws IOException
    */
   @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" })
   public List<Token<?>> getDelegationTokens(String renewer) throws IOException {
-    return null;
+    return new ArrayList<Token<?>>(0);
   }
   
   @Override //Object

+ 0 - 3
src/java/org/apache/hadoop/fs/DelegateToFileSystem.java

@@ -29,10 +29,7 @@ import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
-import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.token.Token;
-import org.apache.hadoop.security.token.SecretManager.InvalidToken;
-import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier;
 import org.apache.hadoop.util.Progressable;
 
 /**

+ 5 - 5
src/java/org/apache/hadoop/fs/FileSystem.java

@@ -50,8 +50,6 @@ import org.apache.hadoop.io.MultipleIOException;
 import org.apache.hadoop.security.SecurityUtil;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
-import org.apache.hadoop.security.token.SecretManager.InvalidToken;
-import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier;
 import org.apache.hadoop.util.Progressable;
 import org.apache.hadoop.util.ReflectionUtils;
 
@@ -367,6 +365,7 @@ public abstract class FileSystem extends Configured implements Closeable {
    * @throws IOException
    */
   @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
+  @Deprecated
   public Token<?> getDelegationToken(String renewer) throws IOException {
     return null;
   }
@@ -379,11 +378,12 @@ public abstract class FileSystem extends Configured implements Closeable {
    * 
    * @param renewer the account name that is allowed to renew the token.
    * @return list of new delegation tokens
+   *    If delegation tokens not supported then return a list of size zero.
    * @throws IOException
    */
   @InterfaceAudience.LimitedPrivate( { "HDFS", "MapReduce" })
   public List<Token<?>> getDelegationTokens(String renewer) throws IOException {
-    return null;
+    return new ArrayList<Token<?>>(0);
   }
 
   /** create a file with the provided permission
@@ -544,9 +544,9 @@ public abstract class FileSystem extends Configured implements Closeable {
    * @return fully qualified path 
    * @throws FileNotFoundException
    */
-   public Path resolvePath(final Path p) throws FileNotFoundException {
+   public Path resolvePath(final Path p) throws IOException {
      checkPath(p);
-     return p; // default is to return the path
+     return getFileStatus(p).getPath();
    }
 
   /**

+ 2 - 1
src/java/org/apache/hadoop/fs/FilterFileSystem.java

@@ -96,7 +96,7 @@ public class FilterFileSystem extends FileSystem {
   }
 
   @Override
-  public Path resolvePath(final Path p) throws FileNotFoundException {
+  public Path resolvePath(final Path p) throws IOException {
     return fs.resolvePath(p);
   }
 
@@ -371,6 +371,7 @@ public class FilterFileSystem extends FileSystem {
   }
   
   @Override // FileSystem
+  @SuppressWarnings("deprecation")
   public Token<?> getDelegationToken(String renewer) throws IOException {
     return fs.getDelegationToken(renewer);
   }

+ 2 - 1
src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java

@@ -224,7 +224,8 @@ public class ViewFileSystem extends FileSystem {
   }
   
   @Override
-  public Path resolvePath(final Path f) throws FileNotFoundException {
+  public Path resolvePath(final Path f)
+      throws IOException {
     final InodeTree.ResolveResult<FileSystem> res;
       res = fsState.resolve(getUriPath(f), true);
     if (res.isInternalDir()) {