Sqoop
  1. Sqoop
  2. SQOOP-353

Cleanup the if/else statement in HiveTypes

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0-incubating
    • Component/s: None
    • Labels:
      None
    1. SQOOP-353-v3.patch
      3 kB
      Alex Newman
    2. SQOOP-353-v2.patch
      3 kB
      Alex Newman
    3. 0001-SQOOP-353.-Sqoop-doesn-t-import-binary-types-into-hi.patch
      5 kB
      Alex Newman

      Activity

      Alex Newman created issue -
      Alex Newman made changes -
      Field Original Value New Value
      Status Open [ 1 ] Patch Available [ 10002 ]
      Alex Newman made changes -
      Hide
      Alex Newman added a comment -

      This should probably have some testing around it. Any recommendations?

      Show
      Alex Newman added a comment - This should probably have some testing around it. Any recommendations?
      Hide
      Bilung Lee added a comment -

      Thanks for the patch, Alex! Look like your patch includes
      (1) Binary type mapping into Hive
      (2) Replace the if-else clauses with a case statement.

      Since SQOOP-342 introduces a more flexible option to allow mapping into specific Hive types, I would suggest to use that for (1) instead. Even though, it is good to use a case statement in (2), and we should keep that still. What do you think?

      Show
      Bilung Lee added a comment - Thanks for the patch, Alex! Look like your patch includes (1) Binary type mapping into Hive (2) Replace the if-else clauses with a case statement. Since SQOOP-342 introduces a more flexible option to allow mapping into specific Hive types, I would suggest to use that for (1) instead. Even though, it is good to use a case statement in (2), and we should keep that still. What do you think?
      Hide
      Alex Newman added a comment - - edited

      Seems reasonable, 342 seems reasonable. Do you want me to repatch?

      Show
      Alex Newman added a comment - - edited Seems reasonable, 342 seems reasonable. Do you want me to repatch?
      Hide
      Bilung Lee added a comment -

      Yes, please submit a new patch. Thanks!

      Show
      Bilung Lee added a comment - Yes, please submit a new patch. Thanks!
      Alex Newman made changes -
      Summary Sqoop doesn't import binary types into hive Cleanup the if/else statement in HiveTypes
      Description Currently there is no way to import BLOBs,CLOBS or binaries into hive via sqoop. We could simply make these a string and warn that it's an inexact type.
      Alex Newman made changes -
      Priority Major [ 3 ] Trivial [ 5 ]
      Hide
      Alex Newman added a comment - - edited

      So I have changed the subject. And once my unit tests are done running I'll update the patch. Also do we have additional jenkins resources I can test on?

      Show
      Alex Newman added a comment - - edited So I have changed the subject. And once my unit tests are done running I'll update the patch. Also do we have additional jenkins resources I can test on?
      Alex Newman made changes -
      Status Patch Available [ 10002 ] Open [ 1 ]
      Alex Newman made changes -
      Status Open [ 1 ] Patch Available [ 10002 ]
      Alex Newman made changes -
      Attachment SQOOP-353-v2.patch [ 12499731 ]
      Hide
      Bilung Lee added a comment -

      Thanks for the update! Two suggestions:
      1. Use "Types.INTEGER" (instead just "INTEGER") in the first case.
      2. Remove "import static java.sql.Types.INTEGER;".

      Show
      Bilung Lee added a comment - Thanks for the update! Two suggestions: 1. Use "Types.INTEGER" (instead just "INTEGER") in the first case. 2. Remove "import static java.sql.Types.INTEGER;".
      Alex Newman made changes -
      Attachment SQOOP-353-v3.patch [ 12499761 ]
      Hide
      Alex Newman added a comment -

      Done

      Show
      Alex Newman added a comment - Done
      Hide
      Bilung Lee added a comment -

      Patch committed. Thanks, Alex!

      Show
      Bilung Lee added a comment - Patch committed. Thanks, Alex!
      Bilung Lee made changes -
      Status Patch Available [ 10002 ] Resolved [ 5 ]
      Resolution Fixed [ 1 ]
      Hide
      Hudson added a comment -

      Integrated in Sqoop-jdk-1.6 #41 (See https://builds.apache.org/job/Sqoop-jdk-1.6/41/)
      SQOOP-353 Cleanup the if/else statement in HiveTypes

      blee : http://svn.apache.org/viewvc/?view=rev&rev=1186537
      Files :

      • /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java
      Show
      Hudson added a comment - Integrated in Sqoop-jdk-1.6 #41 (See https://builds.apache.org/job/Sqoop-jdk-1.6/41/ ) SQOOP-353 Cleanup the if/else statement in HiveTypes blee : http://svn.apache.org/viewvc/?view=rev&rev=1186537 Files : /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/hive/HiveTypes.java
      Arvind Prabhakar made changes -
      Fix Version/s 1.4.0-incubating [ 12317345 ]

        People

        • Assignee:
          Alex Newman
          Reporter:
          Alex Newman
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development