Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-936

Classwriter should check if columnNames generated are null before accessing them

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.2, 1.4.3
    • Fix Version/s: 1.4.4
    • Component/s: None
    • Labels:
    • Environment:

      Netezza database tests

      Description

      If a table does not at the time of DROP, Netezza throws an exception but also sets the transaction as ignored (all changes through the connection will be ignored until the txn is either rollback or committed. While adding more tests, I missed the rollback and the create table was ignored, and subsequently ClassWriter.cleanColNames() threw NPE. I am fixing Netezza tests also, but we should check for this and throw a IOException instead of failing with NPE

      1. SQOOP-936.patch
        1.0 kB
        Venkat Ranganathan

        Activity

        Hide
        venkatnrangan Venkat Ranganathan added a comment -

        Trivial patch added - Ran tests

        Show
        venkatnrangan Venkat Ranganathan added a comment - Trivial patch added - Ran tests
        Hide
        jarcec Jarek Jarcec Cecho added a comment -

        It's a simple patch so I'm giving +1 here.

        Show
        jarcec Jarek Jarcec Cecho added a comment - It's a simple patch so I'm giving +1 here.
        Hide
        jarcec Jarek Jarcec Cecho added a comment -
        Show
        jarcec Jarek Jarcec Cecho added a comment - The patch is in: https://git-wip-us.apache.org/repos/asf?p=sqoop.git;a=commit;h=1d0ebc27308609a21f3762a64019098b4ae36e6e Thank you Venkat for your contribution! Jarcec
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop200 #578 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/578/)
        SQOOP-936: Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e
        Files :

        • src/java/org/apache/sqoop/orm/ClassWriter.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop200 #578 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/578/ ) SQOOP-936 : Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e Files : src/java/org/apache/sqoop/orm/ClassWriter.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop23 #792 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/792/)
        SQOOP-936: Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e
        Files :

        • src/java/org/apache/sqoop/orm/ClassWriter.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop23 #792 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/792/ ) SQOOP-936 : Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e Files : src/java/org/apache/sqoop/orm/ClassWriter.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop100 #592 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/592/)
        SQOOP-936: Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e
        Files :

        • src/java/org/apache/sqoop/orm/ClassWriter.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop100 #592 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/592/ ) SQOOP-936 : Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e Files : src/java/org/apache/sqoop/orm/ClassWriter.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop20 #583 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/583/)
        SQOOP-936: Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e
        Files :

        • src/java/org/apache/sqoop/orm/ClassWriter.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop20 #583 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/583/ ) SQOOP-936 : Classwriter should check if columnNames generated are null before accessing them (Revision 1d0ebc27308609a21f3762a64019098b4ae36e6e) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=1d0ebc27308609a21f3762a64019098b4ae36e6e Files : src/java/org/apache/sqoop/orm/ClassWriter.java

          People

          • Assignee:
            venkatnrangan Venkat Ranganathan
            Reporter:
            venkatnrangan Venkat Ranganathan
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development