Explorar o código

HADOOP-3160. Remove deprecated exists() from ClientProtocol and FSNamesystem (Lohit Vjayarenu via rangadi)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@648772 13f79535-47bb-0310-9956-ffa450edef68
Raghu Angadi %!s(int64=17) %!d(string=hai) anos
pai
achega
a7a75b91f4

+ 3 - 0
CHANGES.txt

@@ -21,6 +21,9 @@ Trunk (unreleased changes)
     HADOOP-3130. Make the connect timeout smaller for getFile.
     (Amar Ramesh Kamat via ddas)
 
+    HADOOP-3160. Remove deprecated exists() from ClientProtocol and 
+    FSNamesystem (Lohit Vjayarenu via rangadi)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 0 - 6
src/java/org/apache/hadoop/dfs/ClientProtocol.java

@@ -232,12 +232,6 @@ interface ClientProtocol extends VersionedProtocol {
    */
   public boolean delete(String src, boolean recursive) throws IOException;
   
-  /** @deprecated Use getFileInfo() instead
-   * Check whether the given file exists.
-   */
-  @Deprecated
-  public boolean exists(String src) throws IOException;
-
   /**
    * Create a directory (or hierarchy of directories) with the given
    * name and permission.

+ 0 - 1
src/java/org/apache/hadoop/dfs/DFSClient.java

@@ -130,7 +130,6 @@ class DFSClient implements FSConstants {
     methodNameToPolicyMap.put("abandonBlock", methodPolicy);
     methodNameToPolicyMap.put("abandonFileInProgress", methodPolicy);
     methodNameToPolicyMap.put("reportBadBlocks", methodPolicy);
-    methodNameToPolicyMap.put("exists", methodPolicy);
     methodNameToPolicyMap.put("isDir", methodPolicy);
     methodNameToPolicyMap.put("getListing", methodPolicy);
     methodNameToPolicyMap.put("getHints", methodPolicy);

+ 0 - 8
src/java/org/apache/hadoop/dfs/FSNamesystem.java

@@ -1543,14 +1543,6 @@ class FSNamesystem implements FSConstants, FSNamesystemMBean {
     return true;
   }
 
-  /** @deprecated Use getFileInfo(String) instead
-   * Return whether the given filename exists
-   */
-  @Deprecated
-  public boolean exists(String src) throws IOException {
-      return getFileInfo(src) != null;
-  }
-
   /** Get the file info for a specific file.
    * @param src The string representation of the path to the file
    * @throws IOException if permission to access file is denied by the system 

+ 0 - 6
src/java/org/apache/hadoop/dfs/NameNode.java

@@ -382,12 +382,6 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
     stateChangeLog.debug("*DIR* Namenode.delete:  " + src);
     return namesystem.delete(src, recursive);
   }
-  /**@deprecated Use getFileInfo(String) instead
-   */
-  @Deprecated
-  public boolean exists(String src) throws IOException {
-    return getFileInfo(src) != null;
-  }
 
   /**
    * Check path length does not exceed maximum.  Returns true if