apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deepak-narkhede <...@git.apache.org>
Subject [GitHub] apex-malhar pull request #489: APEXMALHAR-2330 JdbcPOJOPollInputOperator fai...
Date Wed, 09 Nov 2016 16:16:31 GMT
GitHub user deepak-narkhede reopened a pull request:

    https://github.com/apache/apex-malhar/pull/489

    APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerExcep…

    **Problem:** 
    JdbcPOJOPollInputOperator fails with NullPointerException using PostgreSQL driver.
    
    **Problem Description:**
    1) When JdbcPOJOPollInputOperator tries to populateColumnDataTypes, column names retrieved
from resultmetadata from database ( this case : Postgres) are all lowercase.
    2) Whereas columnDatatypes specified in fieldinfos might be in same case.
    3) Internally hashmap ( nameToType) is used which mismatches if column name and fieldinfo
are not in same case. Hence columnDataTypes is empty which causes null exception in activate
call.
    
    **Solution:**
    Using similar case for hashmap and column names irrespective of any database used for
JdbcPOJOPollInputOperator.
    
    **Testing:**
    Tested with Database-to-hdfs app also with instrumented logs.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/deepak-narkhede/apex-malhar APEXMALHAR-2330

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/apex-malhar/pull/489.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #489
    
----
commit 58812c41bcff437db97853e5c5b628a9f9f5dbc4
Author: deepak-narkhede <mailtodeepakn@gmail.com>
Date:   2016-11-09T13:37:10Z

    APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerException when PostgreSQL
driver.
    
    Using similar case for hashmap and column names irrespective of any database used for
JdbcPOJOPollInputOperator.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message