Sqoop
  1. Sqoop
  2. SQOOP-1189

Sqoop2: Ensure that clone methods will correctly copy over all values from all parents

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.99.2
    • Fix Version/s: 1.99.4
    • Component/s: None
    • Labels:
      None

      Description

      I've noticed that currently metadata upgrade is loosing data as variables from MAccountableEntity are not carried over during upgrade. We should enhance the model classes to make their cloning easier, so that it won't be that easy to forget to copy come values from parent classes.

      1. bugSQOOP-1189.patch
        26 kB
        Jarek Jarcec Cecho

        Issue Links

          Activity

          Hide
          Sqoop QA bot added a comment -

          Here are the results of testing the latest attachment
          https://issues.apache.org/jira/secure/attachment/12601156/bugSQOOP-1189.patch against branch sqoop2.

          Overall: +1 all checks pass

          SUCCESS: Clean was successful
          SUCCESS: Patch applied correctly
          SUCCESS: Patch add/modify test case
          SUCCESS: Patch compiled
          SUCCESS: All tests passed

          Console output: https://builds.apache.org/job/PreCommit-SQOOP-Build/132/console

          This message is automatically generated.

          Show
          Sqoop QA bot added a comment - Here are the results of testing the latest attachment https://issues.apache.org/jira/secure/attachment/12601156/bugSQOOP-1189.patch against branch sqoop2. Overall: +1 all checks pass SUCCESS: Clean was successful SUCCESS: Patch applied correctly SUCCESS: Patch add/modify test case SUCCESS: Patch compiled SUCCESS: All tests passed Console output: https://builds.apache.org/job/PreCommit-SQOOP-Build/132/console This message is automatically generated.
          Hide
          Hari Shreedharan added a comment -

          Nice catch. Patch looks good. I think there can be some parameterization done in the MAccountableEntity, MConnection and MJob classes to avoid so much similar repeated code - but that is for another day, and not within the scope of this jira.

          Show
          Hari Shreedharan added a comment - Nice catch. Patch looks good. I think there can be some parameterization done in the MAccountableEntity, MConnection and MJob classes to avoid so much similar repeated code - but that is for another day, and not within the scope of this jira.
          Hide
          ASF subversion and git services added a comment -

          Commit ebe62d366357ac99a71e5b0e25e97bd514dbd7f0 in branch refs/heads/sqoop2 from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=ebe62d3 ]

          SQOOP-1189. Sqoop2: Ensure that clone methods will correctly copy over all values from all parents

          (Jarek Jarcec Cecho via Hari Shreedharan)

          Show
          ASF subversion and git services added a comment - Commit ebe62d366357ac99a71e5b0e25e97bd514dbd7f0 in branch refs/heads/sqoop2 from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=ebe62d3 ] SQOOP-1189 . Sqoop2: Ensure that clone methods will correctly copy over all values from all parents (Jarek Jarcec Cecho via Hari Shreedharan)
          Hide
          Hari Shreedharan added a comment -

          Committed, thanks Jarcec!

          Show
          Hari Shreedharan added a comment - Committed, thanks Jarcec!
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Sqoop2-hadoop100 #590 (See https://builds.apache.org/job/Sqoop2-hadoop100/590/)
          SQOOP-1189. Sqoop2: Ensure that clone methods will correctly copy over all values from all parents (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=ebe62d366357ac99a71e5b0e25e97bd514dbd7f0)

          • common/src/main/java/org/apache/sqoop/model/MConnection.java
          • common/src/test/java/org/apache/sqoop/model/TestMJob.java
          • common/src/main/java/org/apache/sqoop/model/MJob.java
          • common/src/test/java/org/apache/sqoop/model/TestMConnection.java
          • common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java
          • common/src/main/java/org/apache/sqoop/model/MPersistableEntity.java
          • core/src/main/java/org/apache/sqoop/repository/Repository.java
          Show
          Hudson added a comment - FAILURE: Integrated in Sqoop2-hadoop100 #590 (See https://builds.apache.org/job/Sqoop2-hadoop100/590/ ) SQOOP-1189 . Sqoop2: Ensure that clone methods will correctly copy over all values from all parents (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=ebe62d366357ac99a71e5b0e25e97bd514dbd7f0 ) common/src/main/java/org/apache/sqoop/model/MConnection.java common/src/test/java/org/apache/sqoop/model/TestMJob.java common/src/main/java/org/apache/sqoop/model/MJob.java common/src/test/java/org/apache/sqoop/model/TestMConnection.java common/src/main/java/org/apache/sqoop/model/MAccountableEntity.java common/src/main/java/org/apache/sqoop/model/MPersistableEntity.java core/src/main/java/org/apache/sqoop/repository/Repository.java
          Hide
          Jarek Jarcec Cecho added a comment -

          The failure in profile 200 is the usual Jenkins glitch.

          Show
          Jarek Jarcec Cecho added a comment - The failure in profile 200 is the usual Jenkins glitch.

            People

            • Assignee:
              Jarek Jarcec Cecho
              Reporter:
              Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development