hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r378043 - in /lucene/hadoop/trunk/src/java/org/apache/hadoop: io/Closeable.java mapred/Closeable.java mapred/CombiningCollector.java mapred/Mapper.java mapred/ReduceTask.java mapred/Reducer.java
Date Wed, 15 Feb 2006 17:52:30 GMT
Author: cutting
Date: Wed Feb 15 09:52:29 2006
New Revision: 378043

URL: http://svn.apache.org/viewcvs?rev=378043&view=rev
Log:
Move Closeable interface to io package, since it is of general utility, and to prepare for
JDK 1.5.

Added:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/io/Closeable.java
      - copied, changed from r378039, lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Closeable.java
Removed:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Closeable.java
Modified:
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/CombiningCollector.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Mapper.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Reducer.java

Copied: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/Closeable.java (from r378039, lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Closeable.java)
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/Closeable.java?p2=lucene/hadoop/trunk/src/java/org/apache/hadoop/io/Closeable.java&p1=lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Closeable.java&r1=378039&r2=378043&rev=378043&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Closeable.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/Closeable.java Wed Feb 15 09:52:29 2006
@@ -14,11 +14,15 @@
  * limitations under the License.
  */
 
-package org.apache.hadoop.mapred;
+package org.apache.hadoop.io;
+
+import java.io.IOException;
+
+// NOTE: Replace with java.io.Closeable when we upgrade to Java 1.5.
 
 /** That which can be closed. */
 public interface Closeable {
   /** Called after the last call to any other method on this object to free
    * and/or flush resources.  Typical implementations do nothing. */
-  void close();
+  void close() throws IOException;
 }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/CombiningCollector.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/CombiningCollector.java?rev=378043&r1=378042&r2=378043&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/CombiningCollector.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/CombiningCollector.java Wed Feb
15 09:52:29 2006
@@ -78,9 +78,8 @@
     count = 0;
   }
   
-  public synchronized void close() 
-  { 
-	  combiner.close(); 
-  } 
+  public synchronized void close() throws IOException { 
+    combiner.close(); 
+  }
 
 }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Mapper.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Mapper.java?rev=378043&r1=378042&r2=378043&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Mapper.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Mapper.java Wed Feb 15 09:52:29
2006
@@ -18,6 +18,7 @@
 
 import java.io.IOException;
 
+import org.apache.hadoop.io.Closeable;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java?rev=378043&r1=378042&r2=378043&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/ReduceTask.java Wed Feb 15 09:52:29
2006
@@ -285,7 +285,7 @@
       }
 
     } finally {
-    	reducer.close();
+      reducer.close();
       in.close();
       lfs.delete(new File(sortedFile));           // remove sorted
       out.close(reporter);

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Reducer.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Reducer.java?rev=378043&r1=378042&r2=378043&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Reducer.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/Reducer.java Wed Feb 15 09:52:29
2006
@@ -20,6 +20,7 @@
 
 import java.util.Iterator;
 
+import org.apache.hadoop.io.Closeable;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
 



Mime
View raw message