hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rang...@apache.org
Subject svn commit: r656464 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/ClientProtocol.java src/java/org/apache/hadoop/dfs/FSNamesystem.java src/java/org/apache/hadoop/dfs/LeaseManager.java src/java/org/apache/hadoop/dfs/NameNode.java
Date Wed, 14 May 2008 23:25:41 GMT
Author: rangadi
Date: Wed May 14 16:25:41 2008
New Revision: 656464

URL: http://svn.apache.org/viewvc?rev=656464&view=rev
Log:
HADOOP-3390. Removed deprecated ClientProtocol.abandonFileInProgress(). (Tsz Wo (Nicholas),
SZE via rangadi)

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/LeaseManager.java
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NameNode.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=656464&r1=656463&r2=656464&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed May 14 16:25:41 2008
@@ -51,6 +51,9 @@
     Existing blocks get a generation stamp of 0. This is needed to support
     appends. (dhruba)
 
+    HADOOP-3390. Removed deprecated ClientProtocol.abandonFileInProgress().
+    (Tsz Wo (Nicholas), SZE via rangadi)
+
   NEW FEATURES
 
     HADOOP-3074. Provides a UrlStreamHandler for DFS and other FS,

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java?rev=656464&r1=656463&r2=656464&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java Wed May 14 16:25:41
2008
@@ -37,9 +37,9 @@
    * Compared to the previous version the following changes have been introduced:
    * (Only the latest change is reflected.
    * The log of historical changes can be retrieved from the svn).
-   * 33 : Block generation stamp stored in Block
+   * 34 : remove abandonFileInProgress(...)
    */
-  public static final long versionID = 33L;
+  public static final long versionID = 34L;
   
   ///////////////////////////////////////
   // File contents
@@ -76,9 +76,8 @@
    * <p>
    * Once created, the file is visible and available for read to other clients.
    * Although, other clients cannot {@link #delete(String)}, re-create or 
-   * {@link #rename(String, String)} it until the file is completed or 
-   * abandoned implicitely by {@link #abandonFileInProgress(String, String)}
-   * or explicitely as a result of lease expiration.
+   * {@link #rename(String, String)} it until the file is completed
+   * or explicitly as a result of lease expiration.
    * <p>
    * Blocks have a maximum size.  Clients that intend to
    * create multi-block files must also use {@link #addBlock(String, String)}.
@@ -160,20 +159,6 @@
   public LocatedBlock addBlock(String src, String clientName) throws IOException;
 
   /**
-   * A client that wants to abandon writing to the current file
-   * should call abandonFileInProgress().  After this call, any
-   * client can call create() to obtain the filename.
-   * <p>
-   * Any blocks that have been written for the file will be 
-   * garbage-collected.
-   * @param src The filename
-   * @param holder The datanode holding the lease
-   */
-  @Deprecated
-  public void abandonFileInProgress(String src, 
-                                    String holder) throws IOException;
-
-  /**
    * The client is done writing data to the given filename, and would 
    * like to complete it.  
    *

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?rev=656464&r1=656463&r2=656464&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Wed May 14 16:25:41
2008
@@ -1085,16 +1085,6 @@
   }
 
   /**
-   * Abandon the entire file in progress
-   */
-  public synchronized void abandonFileInProgress(String src, 
-                                                 String holder
-                                                 ) throws IOException {
-    NameNode.stateChangeLog.debug("DIR* NameSystem.abandonFileInProgress:" + src);
-    leaseManager.abandonLease(src, holder);
-  }
-
-  /**
    * The FSNamesystem will already know the blocks that make up the file.
    * Before we return, we make sure that all the file's blocks have 
    * been reported by datanodes and are replicated correctly.

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/LeaseManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/LeaseManager.java?rev=656464&r1=656463&r2=656464&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/LeaseManager.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/LeaseManager.java Wed May 14 16:25:41
2008
@@ -120,24 +120,6 @@
     }
   }
 
-  synchronized void abandonLease(String src, String holder) throws IOException {
-    // find the lease
-    Lease lease = getLease(holder);
-    if (lease != null) {
-      // remove the file from the lease
-      if (lease.completedCreate(src)) {
-        // if we found the file in the lease, remove it from pendingCreates
-        fsnamesystem.internalReleaseCreate(src, holder);
-      } else {
-        LOG.warn("Attempt by " + holder + 
-                 " to release someone else's create lock on " + src);
-      }
-    } else {
-      LOG.warn("Attempt to release a lock from an unknown lease holder "
-               + holder + " for " + src);
-    }
-  }
-
   /************************************************************
    * A Lease governs all the locks held by a single client.
    * For each client there's a corresponding lease, whose

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NameNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NameNode.java?rev=656464&r1=656463&r2=656464&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NameNode.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NameNode.java Wed May 14 16:25:41 2008
@@ -326,16 +326,8 @@
       throw new IOException("Cannot abandon block during write to " + src);
     }
   }
-  /**
-   */
-  @Deprecated
-  public void abandonFileInProgress(String src, 
-                                    String holder) throws IOException {
-    stateChangeLog.debug("*DIR* NameNode.abandonFileInProgress:" + src);
-    namesystem.abandonFileInProgress(src, holder);
-  }
-  /**
-   */
+
+  /** {@inheritDoc} */
   public boolean complete(String src, String clientName) throws IOException {
     stateChangeLog.debug("*DIR* NameNode.complete: " + src + " for " + clientName);
     int returnCode = namesystem.completeFile(src, clientName);



Mime
View raw message