hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r540324 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/conf/Configuration.java src/java/org/apache/hadoop/ipc/Server.java src/java/org/apache/hadoop/mapred/MapTask.java src/java/org/apache/hadoop/mapred/TaskLog.java
Date Mon, 21 May 2007 22:27:16 GMT
Author: cutting
Date: Mon May 21 15:27:11 2007
New Revision: 540324

URL: http://svn.apache.org/viewvc?view=rev&rev=540324
Log:
HADOOP-1364.  Fix various inconsistent synchronization issues.  Contributed by Devaraj.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Server.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLog.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=540324&r1=540323&r2=540324
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon May 21 15:27:11 2007
@@ -36,6 +36,9 @@
  11. HADOOP-1379.  Add findbugs target to build.xml.
      (Nigel Daley via cutting)
 
+ 12. HADOOP-1364.  Fix various inconsistent synchronization issues.
+     (Devaraj Das via cutting)
+
 
 Branch 0.13 (unreleased changes)
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java?view=diff&rev=540324&r1=540323&r2=540324
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/conf/Configuration.java Mon May 21 15:27:11
2007
@@ -689,7 +689,7 @@
   /** Make this class quiet. Error and informational
    *  messages might not be logged.
    */
-  public void setQuietMode(boolean value) {
+  public synchronized void setQuietMode(boolean value) {
     quietmode = value;
   }
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Server.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Server.java?view=diff&rev=540324&r1=540323&r2=540324
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Server.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/ipc/Server.java Mon May 21 15:27:11 2007
@@ -286,12 +286,12 @@
       }
       LOG.info("Stopping " + this.getName());
 
-      try {
-        acceptChannel.close();
-        selector.close();
-      } catch (IOException e) { }
-
       synchronized (this) {
+        try {
+          acceptChannel.close();
+          selector.close();
+        } catch (IOException e) { }
+
         selector= null;
         acceptChannel= null;
         connectionList = null;

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java?view=diff&rev=540324&r1=540323&r2=540324
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/MapTask.java Mon May 21 15:27:11
2007
@@ -329,7 +329,7 @@
                                                                 job.getClass("map.sort.class",
MergeSorter.class,
                                                                              BufferSorter.class),
job);
     }
-    public void startPartition(int partNumber) throws IOException {
+    private void startPartition(int partNumber) throws IOException {
       //We create the sort output as multiple sequence files within a spilled
       //file. So we create a writer for each partition. 
       segmentStart = out.getPos();

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLog.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLog.java?view=diff&rev=540324&r1=540323&r2=540324
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLog.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskLog.java Mon May 21 15:27:11
2007
@@ -367,7 +367,7 @@
      *         purged data.
      * @throws IOException
      */
-    public long getTotalLogSize() throws IOException {
+    public synchronized long getTotalLogSize() throws IOException {
       if (!initialized) {
         init();
       }
@@ -381,7 +381,7 @@
      * @return Returns a <code>byte[]</code> containing the data in user-log.
      * @throws IOException
      */
-    public byte[] fetchAll() throws IOException {
+    public synchronized byte[] fetchAll() throws IOException {
       if (!initialized) {
         init();
       }



Mime
View raw message