hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r499970 - in /lucene/hadoop/trunk: ./ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/fs/ src/java/org/apache/hadoop/fs/s3/ src/java/org/apache/hadoop/mapred/
Date Thu, 25 Jan 2007 21:02:30 GMT
Author: cutting
Date: Thu Jan 25 13:02:29 2007
New Revision: 499970

URL: http://svn.apache.org/viewvc?view=rev&rev=499970
Log:
HADOOP-726.  Deprecate FileSystem locking methods.  Contributed by Raghu.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3FileSystem.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Jan 25 13:02:29 2007
@@ -107,6 +107,10 @@
     under-replicated should be further replicated before blocks which
     are less under-replicated.  (Hairong Kuang via cutting)
 
+15. HADOOP-726.  Deprecate FileSystem locking methods.  They are not
+    currently usable.  Locking should eventually provided as an
+    independent service.  (Raghu Angadi via cutting)
+
 
 Release 0.10.0 - 2007-01-05
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/ClientProtocol.java Thu Jan 25 13:02:29
2007
@@ -206,6 +206,7 @@
      * Locking is a part of most filesystems and is useful for a
      * number of inter-process synchronization tasks.
      */
+    /** @deprecated */ @Deprecated
     public boolean obtainLock(String src, String clientName, boolean exclusive) throws IOException;
 
     /**
@@ -213,6 +214,7 @@
      * a held lock.  It returns true if the lock is correctly released.
      * It returns false if the client should wait and try again.
      */
+    /** @deprecated */ @Deprecated
     public boolean releaseLock(String src, String clientName) throws IOException;
 
     /**

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DistributedFileSystem.java Thu Jan
25 13:02:29 2007
@@ -202,10 +202,12 @@
         return dfs.mkdirs(getPath(f));
     }
 
+    /** @deprecated */ @Deprecated
     public void lock(Path f, boolean shared) throws IOException {
         dfs.lock(getPath(f), ! shared);
     }
 
+    /** @deprecated */ @Deprecated
     public void release(Path f) throws IOException {
         dfs.release(getPath(f));
     }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Thu Jan 25 13:02:29
2007
@@ -1286,6 +1286,7 @@
     /**
      * Get a lock (perhaps exclusive) on the given file
      */
+    /** @deprecated */ @Deprecated
     public synchronized int obtainLock( UTF8 src, 
                                         UTF8 holder, 
                                         boolean exclusive) throws IOException {
@@ -1313,6 +1314,7 @@
     /**
      * Release the lock on the given file
      */
+    /** @deprecated */ @Deprecated
     public synchronized int releaseLock(UTF8 src, UTF8 holder) {
         int result = internalReleaseLock(src, holder);
         if (result == COMPLETE_SUCCESS) {

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/NameNode.java Thu Jan 25 13:02:29 2007
@@ -400,8 +400,7 @@
         return namesystem.mkdirs( src );
     }
 
-    /**
-     */
+    /** @deprecated */ @Deprecated
     public boolean obtainLock(String src, String clientName, boolean exclusive) throws IOException
{
         int returnCode = namesystem.obtainLock(new UTF8(src), new UTF8(clientName), exclusive);
         if (returnCode == COMPLETE_SUCCESS) {
@@ -413,8 +412,7 @@
         }
     }
 
-    /**
-     */
+    /** @deprecated */ @Deprecated
     public boolean releaseLock(String src, String clientName) throws IOException {
         int returnCode = namesystem.releaseLock(new UTF8(src), new UTF8(clientName));
         if (returnCode == COMPLETE_SUCCESS) {

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java Thu Jan 25 13:02:29
2007
@@ -815,12 +815,18 @@
 
     /**
      * Obtain a lock on the given Path
+     * 
+     * @deprecated FS does not support file locks anymore.
      */
+    @Deprecated
     public abstract void lock(Path f, boolean shared) throws IOException;
 
     /**
      * Release the lock
+     * 
+     * @deprecated FS does not support file locks anymore.     
      */
+    @Deprecated
     public abstract void release(Path f) throws IOException;
 
     /**

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/LocalFileSystem.java Thu Jan 25 13:02:29
2007
@@ -279,6 +279,7 @@
       return workingDir;
     }
     
+    /** @deprecated */ @Deprecated
     public void lock(Path p, boolean shared) throws IOException {
       File f = pathToFile(p);
       f.createNewFile();
@@ -301,6 +302,7 @@
       }
     }
 
+    /** @deprecated */ @Deprecated
     public void release(Path p) throws IOException {
       File f = pathToFile(p);
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3FileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3FileSystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3FileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/s3/S3FileSystem.java Thu Jan 25 13:02:29
2007
@@ -311,11 +311,13 @@
     return new String[][] { { "localhost" } };
   }
 
+  /** @deprecated */ @Deprecated
   @Override
   public void lock(Path path, boolean shared) throws IOException {
     // TODO: Design and implement
   }
 
+  /** @deprecated */ @Deprecated
   @Override
   public void release(Path path) throws IOException {
     // TODO: Design and implement

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java?view=diff&rev=499970&r1=499969&r2=499970
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/PhasedFileSystem.java Thu Jan 25
13:02:29 2007
@@ -338,6 +338,7 @@
     return baseFS.mkdirs(f) ;
   }
 
+  /** @deprecated */ @Deprecated
   @Override
   public void lock(
       Path f, boolean shared)
@@ -345,6 +346,7 @@
     throw new UnsupportedOperationException("Operation not supported");  
   }
 
+  /** @deprecated */ @Deprecated
   @Override
   public void release(
       Path f)



Mime
View raw message