-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52212/#review153360
-----------------------------------------------------------




src/java/org/apache/sqoop/mapreduce/JobBase.java (line 202)
<https://reviews.apache.org/r/52212/#comment222658>

    I think we could use org.apache.commons.lang.StringUtils#isEmpty method 
instead of (null == tmpjars || (null != tmpjars && tmpjars.length() == 0))
    It basically does the same but makes the code less complex.



src/java/org/apache/sqoop/mapreduce/JobBase.java (line 226)
<https://reviews.apache.org/r/52212/#comment222659>

    I know this is not your code but this patch may be a good opportunity to 
replace the "tmpjars" literals in this method to 
org.apache.sqoop.config.ConfigurationConstants#MAPRED_DISTCACHE_CONF_PARAM.


Hi Liz,

I have applied the patch on my machine, all the tests are successful. Thank you 
for adding a new test class for JobBase, I have just one question regarding the 
test cases: can the tmpjarsInput contain whitespaces? For example is 
",,valid,\t,  ,validother,," a valid tmpjarsInput we need to be able to 
sanitize?

- Szabolcs Vasas


On Oct. 19, 2016, 3:16 p.m., Erzsebet Szilagyi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52212/
> -----------------------------------------------------------
> 
> (Updated Oct. 19, 2016, 3:16 p.m.)
> 
> 
> Review request for Sqoop, Boglarka Egyed, Chris Teoh, Attila Szabo, Anna 
> Szonyi, and Szabolcs Vasas.
> 
> 
> Bugs: SQOOP-3013
>     https://issues.apache.org/jira/browse/SQOOP-3013
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> -------
> 
> When setting job configurations and adding files to "tmpjars", Sqoop does not 
> sanitize the list of empty strings.
> Sqoop should remove empty strings before starting the MR job and raise a 
> warning if an empty string was found.
> 
> The proposed changes check for empty strings in "tmpjars" and remove them 
> along with raising a warning.
> 
> 
> Diffs
> -----
> 
>   src/java/org/apache/sqoop/mapreduce/JobBase.java 7ed2684 
>   src/test/org/apache/sqoop/mapreduce/TestJobBase.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52212/diff/
> 
> 
> Testing
> -------
> 
> - Live test with command including: "tmpjars=,,valid,,,validother,,,"
> - Unit tests
> 
> 
> Thanks,
> 
> Erzsebet Szilagyi
> 
>

Reply via email to