hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Kimball (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MAPREDUCE-1444) Sqoop ConnManager instances can leak Statement objects
Date Tue, 02 Feb 2010 21:24:24 GMT

     [ https://issues.apache.org/jira/browse/MAPREDUCE-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Aaron Kimball updated MAPREDUCE-1444:

    Attachment: MAPREDUCE-1444.patch

This patch adds a {{release()}} method to the ConnManager API which releases the Statement
associated with a returned ResultSet. If a ConnManager provides you with a ResultSet, you
are responsible for calling {{rs.close()}} on the ResultSet and then calling the ConnManager's
{{release()}} method to free internal resources, since we cannot depend on timely finalization.
Furthermore, using methods of ConnManager which make another database call (e.g., {{getColumnTypes()}})
may internally call {{release()}}, nullifying a prior ResultSet (e.g., as returned by {{readTable()}}).
 This has always been the case, but now it is explicit in the code.

This patch does not include explicit tests. Tests using the {{release()}} API are included
in MAPREDUCE-1445. I used Oracle and MySQL administration tools to verify that connections
are closed in a timely fashion and that open connections do not accrue over time, as they
previously did.

> Sqoop ConnManager instances can leak Statement objects
> ------------------------------------------------------
>                 Key: MAPREDUCE-1444
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1444
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: contrib/sqoop
>            Reporter: Aaron Kimball
>            Assignee: Aaron Kimball
>         Attachments: MAPREDUCE-1444.patch
> The ConnManager API returns ResultSets to users but does not provide a mechanism to clean
up the underlying Statement that generated the ResultSet. Problematically, closing the Statement
will invalidate the ResultSet, so these must be cleaned up in LIFO order, putting the onus
on the receiver of the ResultSet.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message