You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/03/08 08:34:08 UTC

[GitHub] [hive] pvary commented on a change in pull request #2040: HIVE-24851: Fix reader leak in AvroGenericRecordReader

pvary commented on a change in pull request #2040:
URL: https://github.com/apache/hive/pull/2040#discussion_r589247191



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/avro/AvroGenericRecordReader.java
##########
@@ -88,22 +88,39 @@ public AvroGenericRecordReader(JobConf job, FileSplit split, Reporter reporter)
       gdr.setExpected(latest);
     }
 
-    if (split.getLength() == 0) {
-      this.isEmptyInput = true;
-      this.start = 0;
-      this.reader = null;
+    org.apache.avro.file.FileReader<GenericRecord> nonFinalReader = null;
+    try {
+      if (split.getLength() == 0) {
+        this.isEmptyInput = true;
+        this.start = 0;
+        this.reader = null;
+      }
+      else {

Review comment:
       nit: we usually do not use newlines here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org