You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by deepak-narkhede <gi...@git.apache.org> on 2016/11/09 13:47:21 UTC

[GitHub] apex-malhar pull request #489: APEXMALHAR-2330 JdbcPOJOPollInputOperator fai...

GitHub user deepak-narkhede opened a pull request:

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

    APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerExcep\u2026

    **Problem:** 
    JdbcPOJOPollInputOperator fails with NullPointerException when 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 <ma...@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.
---

[GitHub] apex-malhar pull request #489: APEXMALHAR-2330 JdbcPOJOPollInputOperator fai...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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.
---

[GitHub] apex-malhar pull request #489: APEXMALHAR-2330 JdbcPOJOPollInputOperator fai...

Posted by deepak-narkhede <gi...@git.apache.org>.
Github user deepak-narkhede closed the pull request at:

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


---
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.
---

[GitHub] apex-malhar pull request #489: APEXMALHAR-2330 JdbcPOJOPollInputOperator fai...

Posted by deepak-narkhede <gi...@git.apache.org>.
GitHub user deepak-narkhede reopened a pull request:

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

    APEXMALHAR-2330 JdbcPOJOPollInputOperator fails with NullPointerExcep\u2026

    **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 <ma...@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.
---