|
|
-
Re: Review Request: SQOOP-481 Sqoop import with --hive-import using wrong column names in --columns throws a NPECheolsoo Park 2012-05-27, 20:30
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4974/ ----------------------------------------------------------- (Updated 2012-05-27 20:30:12.338298) Review request for Sqoop, Arvind Prabhakar and Jarek Cecho. Changes ------- Rebase the patch. Summary ------- The changes include: 1) Introduce a new class SqlTypeMap (subclass of HashMap) that validates values inside the get() and put() methods. This guarantees that the values in the map are always valid (i.e. not null) so that a NPE during auto unboxing can be prevented. 2) Replace HashMap<String, Integer> with SqlTypeMap<String, Integer> in code. This addresses bug SQOOP-481. https://issues.apache.org/jira/browse/SQOOP-481 Diffs (updated) ----- /src/java/org/apache/sqoop/manager/SqlManager.java 1343085 /src/java/org/apache/sqoop/util/SqlTypeMap.java PRE-CREATION /src/test/com/cloudera/sqoop/hive/TestTableDefWriter.java 1343085 Diff: https://reviews.apache.org/r/4974/diff Testing ------- Ran ant test, ant test -Dthirdparty=true, and ant checkstyle. Thanks, Cheolsoo |