drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/5] drill git commit: DRILL-1967: Add null checks to resources in cleanup of Parquet writer that may not be initialized if no schema has been provided to it by the time it is cleaned up.
Date Fri, 20 Mar 2015 05:15:18 GMT
Repository: drill
Updated Branches:
  refs/heads/master 4d398edf8 -> 9c9ee8c43


DRILL-1967: Add null checks to resources in cleanup of Parquet writer that may not be initialized
if no schema has been provided to it by the time it is cleaned up.


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

Branch: refs/heads/master
Commit: 838fd08aec6378d3709842b7f93cfabf1e14f87a
Parents: 4d398ed
Author: Jason Altekruse <altekrusejason@gmail.com>
Authored: Thu Mar 19 19:50:01 2015 -0700
Committer: Jason Altekruse <altekrusejason@gmail.com>
Committed: Thu Mar 19 19:50:01 2015 -0700

----------------------------------------------------------------------
 .../apache/drill/exec/store/parquet/ParquetRecordWriter.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/838fd08a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
index 8bf9a92..4a8ff5e 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetRecordWriter.java
@@ -315,8 +315,12 @@ public class ParquetRecordWriter extends ParquetOutputRecordWriter {
       parquetFileWriter.endBlock();
       parquetFileWriter.end(extraMetaData);
     }
-    store.close();
-    ColumnChunkPageWriteStoreExposer.close(pageStore);
+    if (store != null) {
+      store.close();
+    }
+    if (pageStore != null) {
+      ColumnChunkPageWriteStoreExposer.close(pageStore);
+    }
     if(oContext!=null){
       oContext.close();
     }


Mime
View raw message