You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Tomoya Tainaka (JIRA)" <ji...@apache.org> on 2011/04/26 04:07:03 UTC

[jira] [Updated] (MAPREDUCE-2453) DBinputFormat throws OutOfMemory exceptions when importing large tables from PostgreSQL.

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

Tomoya Tainaka updated MAPREDUCE-2453:
--------------------------------------

    Attachment: MAPREDUCE-2453-4.patch
                MAPREDUCE-2453-3.patch
                MAPREDUCE-2453-2.patch
                MAPREDUCE-2453-1.patch

> DBinputFormat throws OutOfMemory exceptions when importing large tables from PostgreSQL.
> ----------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-2453
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2453
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.21.0
>            Reporter: Tomoya Tainaka
>            Priority: Minor
>         Attachments: MAPREDUCE-2453-1.patch, MAPREDUCE-2453-2.patch, MAPREDUCE-2453-3.patch, MAPREDUCE-2453-4.patch
>
>
> DBinputFormat throws OutOfMemory exceptions and Java heap space errors when importing large tables from PostgreSQL. This is because loading the whole resultset into memory at the same time. As a consequence, the Java heap space is exhausted.
> Also, this problem happens with DataDrivenDBInputFormat.
> I suggest utilizing "Fetch Size" parameter of JDBC within DBInputFormat. 
> I made patches as follows:
> ・modifying org.apache.hadoop.mapreduce.lib.db.DBInputFormat. 
> ・creating org.apache.hadoop.mapreduce.PostgreSQLDBRecordReader.java. 
> ・adding JDBC options of fetch size, which are setFetchSize() and setAutoCommit().
> I also modified DataDrivenDBinputFormat in the same way as DBInputFormat.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira