----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54575/#review158655 -----------------------------------------------------------
Hi Attila, This looks better than the other solution, however please fix the "magic strings" :) Thanks, /Anna src/java/org/apache/sqoop/orm/ClassWriter.java (line 1790) <https://reviews.apache.org/r/54575/#comment229443> Please extract this into a constant with a meaningful name. src/java/org/apache/sqoop/orm/CompilationManager.java (line 174) <https://reviews.apache.org/r/54575/#comment229444> please also extract this into a constant. - Anna Szonyi On Dec. 9, 2016, 5:57 a.m., Attila Szabo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54575/ > ----------------------------------------------------------- > > (Updated Dec. 9, 2016, 5:57 a.m.) > > > Review request for Sqoop and Anna Szonyi. > > > Bugs: SQOOP-3075 > https://issues.apache.org/jira/browse/SQOOP-3075 > > > Repository: sqoop-trunk > > > Description > ------- > > Although SQOOP-3074 achieved that Sqoop won't fail anymore with special > characters even if the locale on the caller system is not UTF-8, there's a > simpler solution to do the same thing, by tuning the compiler + classwriter > itself (by adding explicit encodings) instead of using the > StringEscapeUtils#escapeJava mechanism. > This solution seems simpler, and won't introduce any confusion around > generation of Java identifiers. > > > Diffs > ----- > > src/java/org/apache/sqoop/avro/AvroUtil.java 8d901302 > src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 5b1c7457 > src/java/org/apache/sqoop/orm/ClassWriter.java 0c8d86d0 > src/java/org/apache/sqoop/orm/CompilationManager.java 0a2a87f2 > > Diff: https://reviews.apache.org/r/54575/diff/ > > > Testing > ------- > > ant clean test > > ant clean test -Dthirdparty=true -Dsqoop.thirdparty.lib.dir=/root > -Dsqoop.test.mysql.connectstring.host_url=jdbc:mysql://mysqlhostname/ > -Dsqoop.test.mysql.databasename=sqoop_repo -Dsqoop.test.mysql.password=sqoop > -Dsqoop.test.mysql.username=sqoop > -Dsqoop.test.oracle.connectstring=jdbc:oracle:thin:@//oraclehostname/orcl > -Dsqoop.test.postgresql.connectstring.host_url=jdbc:postgresql://postgreshostname/ > -Dsqoop.test.cubrid.connectstring.host_url=jdbc:cubrid:cubridhotname:33000 > -Dsqoop.test.cubrid.connectstring.username=sqoop > -Dsqoop.test.cubrid.connectstring.database=sqoop > -Dsqoop.test.cubrid.connectstring.password=sqoop > -Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom" > -Dtest.timeout=1000000 > > > Thanks, > > Attila Szabo > >