[ 
https://issues.apache.org/jira/browse/ORC-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645348#comment-16645348
 ] 

ASF GitHub Bot commented on ORC-416:
------------------------------------

zsxwing commented on a change in pull request #320: ORC-416: Avoid opening data 
reader when there is no stripe
URL: https://github.com/apache/orc/pull/320#discussion_r224183154
 
 

 ##########
 File path: java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
 ##########
 @@ -249,7 +249,6 @@ protected RecordReaderImpl(ReaderImpl fileReader,
               .withZeroCopy(zeroCopy)
               .build());
     }
-    this.dataReader.open();
 
 Review comment:
   So this is not going to resolve 
https://issues.apache.org/jira/browse/SPARK-23390 Right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Avoid opening data reader when there is no stripe
> -------------------------------------------------
>
>                 Key: ORC-416
>                 URL: https://issues.apache.org/jira/browse/ORC-416
>             Project: ORC
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2, 1.5.3
>            Reporter: Dongjoon Hyun
>            Assignee: Dongjoon Hyun
>            Priority: Major
>             Fix For: 1.5.4, 1.6.0
>
>
> Currently, `RecordReaderImpl` invokes `dataReader.open` in the middle of the 
> constructor. We can postpone this until `advanceToNextRow` reads the stripe 
> at the end of the constructor.
> {code:java}
> this.dataReader.open();
> {code}
> This will reduce the chance of potential open-file leakages due to 
> IOException and OOM during `RecordReaderImpl` construction. Also, we can 
> avoid it completely when there is no stripe in the file.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to