hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1124440 - in /hadoop/common/branches/yahoo-merge/src/java: ./ org/apache/hadoop/fs/ org/apache/hadoop/fs/viewfs/
Date Wed, 18 May 2011 21:36:38 GMT
Author: suresh
Date: Wed May 18 21:36:38 2011
New Revision: 1124440

URL: http://svn.apache.org/viewvc?rev=1124440&view=rev
Log:
Fixing the merge issues from the change r1102011

Modified:
    hadoop/common/branches/yahoo-merge/src/java/core-default.xml
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/AbstractFileSystem.java
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/DelegateToFileSystem.java
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileSystem.java
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FilterFileSystem.java
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java

Modified: hadoop/common/branches/yahoo-merge/src/java/core-default.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/core-default.xml?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/core-default.xml (original)
+++ hadoop/common/branches/yahoo-merge/src/java/core-default.xml Wed May 18 21:36:38 2011
@@ -254,6 +254,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.AbstractFileSystem.file.impl</name>
   <value>org.apache.hadoop.fs.local.LocalFs</value>
   <description>The AbstractFileSystem for file: uris.</description>
@@ -275,6 +282,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.s3.impl</name>
   <value>org.apache.hadoop.fs.s3.S3FileSystem</value>
   <description>The FileSystem for s3: uris.</description>

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/AbstractFileSystem.java?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/AbstractFileSystem.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/AbstractFileSystem.java
Wed May 18 21:36:38 2011
@@ -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

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/DelegateToFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/DelegateToFileSystem.java?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/DelegateToFileSystem.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/DelegateToFileSystem.java
Wed May 18 21:36:38 2011
@@ -29,10 +29,7 @@ import org.apache.hadoop.classification.
 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;
 
 /**

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileSystem.java?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileSystem.java Wed May
18 21:36:38 2011
@@ -50,8 +50,6 @@ import org.apache.hadoop.io.MultipleIOEx
 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
    * @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
    * 
    * @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
    * @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();
    }
 
   /**

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FilterFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FilterFileSystem.java?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FilterFileSystem.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FilterFileSystem.java
Wed May 18 21:36:38 2011
@@ -96,7 +96,7 @@ public class FilterFileSystem extends Fi
   }
 
   @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 Fi
   }
   
   @Override // FileSystem
+  @SuppressWarnings("deprecation")
   public Token<?> getDelegationToken(String renewer) throws IOException {
     return fs.getDelegationToken(renewer);
   }

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java?rev=1124440&r1=1124439&r2=1124440&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
(original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java
Wed May 18 21:36:38 2011
@@ -224,7 +224,8 @@ public class ViewFileSystem extends File
   }
   
   @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()) {



Mime
View raw message