hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanth Jayachandran (JIRA)" <>
Subject [jira] [Commented] (HIVE-13523) Fix connection leak in ORC RecordReader and refactor for unit testing
Date Thu, 14 Apr 2016 23:46:25 GMT


Prasanth Jayachandran commented on HIVE-13523:

LGTM, +1. Pending tests. 

> Fix connection leak in ORC RecordReader and refactor for unit testing
> ---------------------------------------------------------------------
>                 Key: HIVE-13523
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: ORC
>    Affects Versions: 2.0.0
>            Reporter: Thomas Poepping
>            Assignee: Thomas Poepping
>         Attachments: HIVE-13523.patch
> In RecordReaderImpl, a MetadataReaderImpl object was being created (opening a file),
but never closed, causing a leak. This change closes the Metadata object in RecordReaderImpl,
and does substantial refactoring to make RecordReaderImpl testable:
>  * Created DataReaderFactory and MetadataReaderFactory (plus default implementations)
so that the create() methods can be mocked to verify that the objects are actually closed
in RecordReaderImpl.close()
>  * Created MetadataReaderProperties and DataReaderProperties to clean up argument lists,
making code more readable
>  * Created a builder() for RecordReaderImpl to make the code more readable
>  * DataReader and MetadataReader now extend closeable (there was no reason for them not
to in the first place) so I can use the guava Closer interface:
>  * Use the Closer interface to guarantee that regardless of if either close() call fails,
both will be attempted (preventing further potential leaks)
>  * Create builders for MetadataReaderProperties, DataReaderProperties, and RecordReaderImpl
to help with code readability

This message was sent by Atlassian JIRA

View raw message