gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1336389 - in /gora/trunk: CHANGES.txt gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
Date Wed, 09 May 2012 20:48:44 GMT
Author: enis
Date: Wed May  9 20:48:43 2012
New Revision: 1336389

URL: http://svn.apache.org/viewvc?rev=1336389&view=rev
Log:
GORA-127 Result objects are not closed properly from GoraRecordReader

Modified:
    gora/trunk/CHANGES.txt
    gora/trunk/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java

Modified: gora/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/trunk/CHANGES.txt?rev=1336389&r1=1336388&r2=1336389&view=diff
==============================================================================
--- gora/trunk/CHANGES.txt (original)
+++ gora/trunk/CHANGES.txt Wed May  9 20:48:43 2012
@@ -10,6 +10,8 @@ Gora Change Log
 
 * GORA-123 Append correct submodule directories to SCM paths in submodule pom's (lewismc)
 
+* GORA-127 Result objects are not closed properly from GoraRecordReader. (enis)
+
 0.2 Release: 20/04/2012
 Jira Release Report: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311172&version=12315541
  

Modified: gora/trunk/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java?rev=1336389&r1=1336388&r2=1336389&view=diff
==============================================================================
--- gora/trunk/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java (original)
+++ gora/trunk/gora-core/src/main/java/org/apache/gora/mapreduce/GoraRecordReader.java Wed
May  9 20:48:43 2012
@@ -95,6 +95,10 @@ public class GoraRecordReader<K, T exten
           this.query.setLimit(counter.getRecordsMax() + 1);
         }
       }
+      if (this.result != null) {
+        this.result.close();
+      }
+      
       executeQuery();
       
       if (! firstBatch) {
@@ -109,7 +113,9 @@ public class GoraRecordReader<K, T exten
 
   @Override
   public void close() throws IOException {
-    result.close();
+    if (result != null) {
+      result.close();
+    }
   }
 
 }



Mime
View raw message