hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r939470 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FileSystem.java
Date Thu, 29 Apr 2010 19:55:45 GMT
Author: tomwhite
Date: Thu Apr 29 19:55:44 2010
New Revision: 939470

URL: http://svn.apache.org/viewvc?rev=939470&view=rev
Log:
HADOOP-6709. Re-instate deprecated FileSystem methods that were removed after 0.20.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileSystem.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=939470&r1=939469&r2=939470&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Thu Apr 29 19:55:44 2010
@@ -375,6 +375,9 @@ Trunk (unreleased changes)
 
     HADOOP-6634. Fix AccessControlList to use short names to verify access 
     control. (Vinod Kumar Vavilapalli via sharad)
+
+    HADOOP-6709. Re-instate deprecated FileSystem methods that were removed
+    after 0.20. (tomwhite)
  
 Release 0.21.0 - Unreleased
 

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileSystem.java?rev=939470&r1=939469&r2=939470&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/fs/FileSystem.java Thu Apr 29 19:55:44
2010
@@ -137,6 +137,17 @@ public abstract class FileSystem extends
   /** Returns a URI whose scheme and authority identify this FileSystem.*/
   public abstract URI getUri();
   
+  /** @deprecated call #getUri() instead.*/
+  @Deprecated
+  public String getName() { return getUri().toString(); }
+
+  /** @deprecated call #get(URI,Configuration) instead. */
+  @Deprecated
+  public static FileSystem getNamed(String name, Configuration conf)
+    throws IOException {
+    return get(URI.create(fixName(name)), conf);
+  }
+  
   /** Update old-format filesystem names, for back-compatibility.  This should
    * eventually be replaced with a checkName() method that throws an exception
    * for old-format names. */ 
@@ -813,6 +824,19 @@ public abstract class FileSystem extends
   public abstract FSDataOutputStream append(Path f, int bufferSize,
       Progressable progress) throws IOException;
 
+ /**
+   * Get replication.
+   * 
+   * @deprecated Use getFileStatus() instead
+   * @param src file name
+   * @return file replication
+   * @throws IOException
+   */ 
+  @Deprecated
+  public short getReplication(Path src) throws IOException {
+    return getFileStatus(src).getReplication();
+  }
+
   /**
    * Set replication for an existing file.
    * 
@@ -922,6 +946,15 @@ public abstract class FileSystem extends
     }
   }
   
+  /**
+   * Delete a file 
+   * @deprecated Use {@link #delete(Path, boolean)} instead.
+   */
+  @Deprecated
+  public boolean delete(Path f) throws IOException {
+    return delete(f, true);
+  }
+  
   /** Delete a file.
    *
    * @param f the path to delete.
@@ -1009,6 +1042,13 @@ public abstract class FileSystem extends
       return false;               // f does not exist
     }
   }
+  
+  /** The number of bytes in a file. */
+  /** @deprecated Use getFileStatus() instead */
+  @Deprecated
+  public long getLength(Path f) throws IOException {
+    return getFileStatus(f).getLen();
+  }
     
   /** Return the {@link ContentSummary} of a given {@link Path}. */
   public ContentSummary getContentSummary(Path f) throws IOException {
@@ -1608,6 +1648,17 @@ public abstract class FileSystem extends
     }
     return used;
   }
+  
+  /**
+   * Get the block size for a particular file.
+   * @param f the filename
+   * @return the number of bytes in a block
+   */
+  /** @deprecated Use getFileStatus() instead */
+  @Deprecated
+  public long getBlockSize(Path f) throws IOException {
+    return getFileStatus(f).getBlockSize();
+  }
 
   /** Return the number of bytes that large input files should be optimally
    * be split into to minimize i/o time. */



Mime
View raw message