hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r483604 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Thu, 07 Dec 2006 18:45:44 GMT
Author: cutting
Date: Thu Dec  7 10:45:43 2006
New Revision: 483604

URL: http://svn.apache.org/viewvc?view=rev&rev=483604
Log:
HADOOP-752.  Rationalize some synchronization in DFS namenode.  Contributed by Dhruba.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=483604&r1=483603&r2=483604
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Dec  7 10:45:43 2006
@@ -12,6 +12,9 @@
  3. HADOOP-621. Change 'dfs -cat' to exit sooner when output has been
     closed.  (Dhruba Borthakur via cutting) 
 
+ 4. HADOOP-752. Rationalize some synchronization in DFS namenode.
+    (Dhruba Borthakur via cutting) 
+
 
 Release 0.9.1 - 2006-12-06
 

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=483604&r1=483603&r2=483604
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Thu Dec  7 10:45:43
2006
@@ -329,9 +329,9 @@
      *         false if file does not exist or is a directory
      * @author shv
      */
-    public boolean setReplication(String src, 
-                                  short replication
-                                ) throws IOException {
+    public synchronized boolean setReplication(String src, 
+                                               short replication
+                                              ) throws IOException {
       if( isInSafeMode() )
         throw new SafeModeException( "Cannot set replication for " + src, safeMode );
       verifyReplication(src, replication, null );
@@ -1745,7 +1745,7 @@
 
     /**
      */
-    public DatanodeInfo[] datanodeReport() {
+    public synchronized DatanodeInfo[] datanodeReport() {
       DatanodeInfo results[] = null;
         synchronized (heartbeats) {
           synchronized (datanodeMap) {
@@ -1760,8 +1760,8 @@
     
     /**
      */
-    public void DFSNodesStatus( ArrayList<DatanodeDescriptor> live, 
-                                ArrayList<DatanodeDescriptor> dead ) {
+    public synchronized void DFSNodesStatus( ArrayList<DatanodeDescriptor> live, 
+                                             ArrayList<DatanodeDescriptor> dead ) {
       synchronized (heartbeats) {
         synchronized (datanodeMap) {
           for(Iterator<DatanodeDescriptor> it = datanodeMap.values().iterator(); it.hasNext();
) {



Mime
View raw message