sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Lin <eric....@cloudera.com>
Subject Review Request 56737: SQOOP-3135 - Not enough error message for debugging when parameters missing
Date Thu, 16 Feb 2017 01:03:07 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for Sqoop and Attila Szabo.

Bugs: SQOOP-3135

Repository: sqoop-trunk


Run the following sqoop command:

sqoop job --create test -- import --connect jdbc:mysql://localhost/test --username root --password
$pass --target-dir /tmp/test10 -m 1 --driver com.mysql.jdbc.Driver  --table test

Due to $pass is not set, command will fail with the following error:

16/12/21 05:48:32 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7-SNAPSHOT
16/12/21 05:48:33 ERROR tool.JobTool: Error parsing arguments to the job-specific tool.
16/12/21 05:48:33 ERROR tool.JobTool: See 'sqoop help <tool>' for usage.

This is not informative, by checking the code in JobTool class:

    // Now feed the arguments into the tool itself.
    try {
      childOptions = childTool.parseArguments(parseableChildArgv,
          null, childOptions, false);
    } catch (ParseException pe) {
      LOG.error("Error parsing arguments to the job-specific tool.");
      LOG.error("See 'sqoop help <tool>' for usage.");
      return 1;
    } catch (SqoopOptions.InvalidOptionsException e) {
      return 1;
The ParseException pe's message has been dropped, we should print out the message in the exception
so that more meaningful message will be printed.


  src/java/org/apache/sqoop/tool/JobTool.java 8e1669c 

Diff: https://reviews.apache.org/r/56737/diff/


Manual test and confirmed the output.


Eric Lin

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message