MAPREDUCE-6972. Enable try-with-resources for RecordReader. Contributed by 
Zoltan Haindrich.

(cherry picked from commit 2523e1cce5f6d6c3762c958c7f3138ab486c8497)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a887016e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a887016e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a887016e

Branch: refs/heads/resource-types
Commit: a887016e1d13d486d5c9541206a7a98a63f42c27
Parents: 12d19d3
Author: Akira Ajisaka <aajis...@apache.org>
Authored: Wed Oct 18 11:18:03 2017 +0900
Committer: Akira Ajisaka <aajis...@apache.org>
Committed: Wed Oct 18 11:19:00 2017 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/mapred/RecordReader.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a887016e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RecordReader.java
----------------------------------------------------------------------
diff --git 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RecordReader.java
 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RecordReader.java
index 6e2c89f..0a996dc 100644
--- 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RecordReader.java
+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RecordReader.java
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.mapred;
 
+import java.io.Closeable;
 import java.io.IOException;
 
 import org.apache.hadoop.classification.InterfaceAudience;
@@ -38,7 +39,7 @@ import org.apache.hadoop.classification.InterfaceStability;
  */
 @InterfaceAudience.Public
 @InterfaceStability.Stable
-public interface RecordReader<K, V> {
+public interface RecordReader<K, V> extends Closeable{
   /** 
    * Reads the next key/value pair from the input for processing.
    *
@@ -74,7 +75,8 @@ public interface RecordReader<K, V> {
    * Close this {@link InputSplit} to future operations.
    * 
    * @throws IOException
-   */ 
+   */
+  @Override
   public void close() throws IOException;
 
   /**


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to