You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Jarek Cecho <ja...@apache.org> on 2013/09/03 11:35:40 UTC

Re: Review Request 13181: SQOOP-773 Sqoop2: Batch execution support for client commands

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


Hi Abe,
thank you very much for working on this. Would you mind rebasing the patch on current HEAD of sqoop2 branch? We've recently split the client module into separate shell and client module via SQOOP-921, so the patch no longer applies cleanly. Couple of high level notes:


server/src/main/java/org/apache/sqoop/server/v1/FrameworkServlet.java
<https://reviews.apache.org/r/13181/#comment50408>

    Nit: This change do not seem to be necessary.



shell/src/main/java/org/apache/sqoop/shell/utils/ConnectionDynamicFormOptions.java
<https://reviews.apache.org/r/13181/#comment50409>

    This file is missing license header.



shell/src/main/java/org/apache/sqoop/shell/utils/DynamicFormOptions.java
<https://reviews.apache.org/r/13181/#comment50410>

    This file is missing license header.



shell/src/main/java/org/apache/sqoop/shell/utils/FormOptions.java
<https://reviews.apache.org/r/13181/#comment50412>

    We're adding here .hasArg()  in all cases (for all input types), however the usage of boolean inputs in fillInputBoolean() method suggest that we are not expecting any arguments as we are just verifying if the parameter was used or not.



shell/src/main/java/org/apache/sqoop/shell/utils/JobDynamicFormOptions.java
<https://reviews.apache.org/r/13181/#comment50411>

    This file is missing license header.


Jarcec

- Jarek Cecho


On Aug. 13, 2013, 9:30 p.m., Abraham Elmahrek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13181/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 9:30 p.m.)
> 
> 
> Review request for Sqoop, Hari Shreedharan and Jarek Cecho.
> 
> 
> Bugs: SQOOP-773
>     https://issues.apache.org/jira/browse/SQOOP-773
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> commit d894ac7b09a18f3fed1fb58bed7554a873fa8630
> Author: Abraham Elmahrek <ab...@elmahrek.com>
> Date:   Wed Jul 31 14:23:58 2013 -0700
> 
>     SQOOP-773 Sqoop2: Batch execution support for client commands
>     
>     Separated options into two groups: fixed and dynamic options.
>     Fixed options (IE: connector ID) come first and are used to select
>     what options should be used in dynamic options. Dynamic options
>     are automatically created based on forms selected from fixed options.
>     The keys for these options take on the form "<prefix>-<form name>-<input-name>".
> 
> :100644 100644 0538901... 7f5df34... M	client/src/main/java/org/apache/sqoop/client/shell/CloneConnectionFunction.java
> :100644 100644 6f62813... 32f8c3f... M	client/src/main/java/org/apache/sqoop/client/shell/CloneJobFunction.java
> :100644 100644 ac555e1... c842c4d... M	client/src/main/java/org/apache/sqoop/client/shell/CreateCommand.java
> :100644 100644 04b240c... f23e479... M	client/src/main/java/org/apache/sqoop/client/shell/CreateConnectionFunction.java
> :100644 100644 cc4d546... 7b40645... M	client/src/main/java/org/apache/sqoop/client/shell/CreateJobFunction.java
> :100644 100644 18d3a70... 5220d61... M	client/src/main/java/org/apache/sqoop/client/shell/DeleteConnectionFunction.java
> :100644 100644 736be20... e82a47b... M	client/src/main/java/org/apache/sqoop/client/shell/DeleteJobFunction.java
> :100644 100644 e04292a... f6cd6e3... M	client/src/main/java/org/apache/sqoop/client/shell/DisableConnectionFunction.java
> :100644 100644 5962cd2... 6ea9f0c... M	client/src/main/java/org/apache/sqoop/client/shell/DisableJobFunction.java
> :100644 100644 ed6dc3c... 094438b... M	client/src/main/java/org/apache/sqoop/client/shell/EnableConnectionFunction.java
> :100644 100644 9e4e320... fb75fa8... M	client/src/main/java/org/apache/sqoop/client/shell/EnableJobFunction.java
> :100644 100644 e843ede... ba89724... M	client/src/main/java/org/apache/sqoop/client/shell/SetOptionFunction.java
> :100644 100644 41fc17a... a241419... M	client/src/main/java/org/apache/sqoop/client/shell/SetServerFunction.java
> :100644 100644 94f92b3... c11b4f3... M	client/src/main/java/org/apache/sqoop/client/shell/ShowConnectionFunction.java
> :100644 100644 b053339... 97e4b9d... M	client/src/main/java/org/apache/sqoop/client/shell/ShowConnectorFunction.java
> :100644 100644 58b2c6e... 362d981... M	client/src/main/java/org/apache/sqoop/client/shell/ShowFrameworkFunction.java
> :100644 100644 97a240b... 9222f50... M	client/src/main/java/org/apache/sqoop/client/shell/ShowJobFunction.java
> :100644 100644 81c5612... 39cf3f3... M	client/src/main/java/org/apache/sqoop/client/shell/ShowOptionFunction.java
> :100644 100644 110f67e... ef4c907... M	client/src/main/java/org/apache/sqoop/client/shell/ShowServerFunction.java
> :100644 100644 666eb7a... 6933965... M	client/src/main/java/org/apache/sqoop/client/shell/ShowSubmissionFunction.java
> :100644 100644 8e17f67... ba65a3c... M	client/src/main/java/org/apache/sqoop/client/shell/ShowVersionFunction.java
> :100644 100644 bf26761... be06116... M	client/src/main/java/org/apache/sqoop/client/shell/SqoopFunction.java
> :100644 100644 2e1c8d3... 7b4f7db... M	client/src/main/java/org/apache/sqoop/client/shell/StartJobFunction.java
> :100644 100644 b854a90... a4808a2... M	client/src/main/java/org/apache/sqoop/client/shell/StatusJobFunction.java
> :100644 100644 49ab461... 3a4905f... M	client/src/main/java/org/apache/sqoop/client/shell/StopJobFunction.java
> :100644 100644 8556e2b... 15cc722... M	client/src/main/java/org/apache/sqoop/client/shell/UpdateConnectionFunction.java
> :100644 100644 425a53f... 4edb306... M	client/src/main/java/org/apache/sqoop/client/shell/UpdateJobFunction.java
> :100644 100644 2fbf129... 711865d... M	client/src/main/java/org/apache/sqoop/client/utils/FormFiller.java
> :000000 100644 0000000... 38e63ba... A	client/src/main/java/org/apache/sqoop/client/utils/FormOptions.java
> 
> 
> Diffs
> -----
> 
>   core/src/test/java/org/apache/sqoop/repository/TestJdbcRepository.java 40a6ecad351682cf6a582dfa46f31b156195949a 
>   server/src/main/java/org/apache/sqoop/server/v1/FrameworkServlet.java 9c9973146eb5756eef3801aca436e8b2eda4b274 
>   shell/src/main/java/org/apache/sqoop/shell/CloneConnectionFunction.java 856abaae5a7745b38b1db42cd9283732d1bc0b64 
>   shell/src/main/java/org/apache/sqoop/shell/CloneJobFunction.java 3e2302514d9350affbc9ab199fb4e91355201290 
>   shell/src/main/java/org/apache/sqoop/shell/CreateConnectionFunction.java 5fbf0a3d8ec13c8e3628525b7d6432d56ddbb0c3 
>   shell/src/main/java/org/apache/sqoop/shell/CreateJobFunction.java 6e4f04bf392f0c062e211fd6709f362ec6e584c3 
>   shell/src/main/java/org/apache/sqoop/shell/DeleteConnectionFunction.java c1237320b3ceec48569c34f4b2a3fa78b4d2c26e 
>   shell/src/main/java/org/apache/sqoop/shell/DeleteJobFunction.java d4095b736d3dcc97487c20cb71c7c460139c2afd 
>   shell/src/main/java/org/apache/sqoop/shell/DisableConnectionFunction.java f1196601857b90442b1c9394902b71d3bd140915 
>   shell/src/main/java/org/apache/sqoop/shell/DisableJobFunction.java a87e51f32226ad6e65b8970d159861e013c6fe9d 
>   shell/src/main/java/org/apache/sqoop/shell/EnableConnectionFunction.java f782b1654203c450b4d22b762dc0f406b560aa29 
>   shell/src/main/java/org/apache/sqoop/shell/EnableJobFunction.java 20c80dca160ddbfa9edb6c5ea5c19fdc3d0bb7c9 
>   shell/src/main/java/org/apache/sqoop/shell/SetOptionFunction.java 1c43dceea2581cea70d0324a63292a0909a402e1 
>   shell/src/main/java/org/apache/sqoop/shell/SetServerFunction.java abd9ceac5a8338dcb1273b0f4732b6bd79962d65 
>   shell/src/main/java/org/apache/sqoop/shell/ShowConnectionFunction.java b7204ffeb5fb17ef4f2a88919e9e3e3c48cd67f8 
>   shell/src/main/java/org/apache/sqoop/shell/ShowConnectorFunction.java 97a4ab2a2377a2aff564f8ffc18884aa11d8a5e3 
>   shell/src/main/java/org/apache/sqoop/shell/ShowFrameworkFunction.java 28497db27295c4ca89ef4b56986818803296cb10 
>   shell/src/main/java/org/apache/sqoop/shell/ShowJobFunction.java fc6f41622125c85efa911b1cf6f7cc68fded8320 
>   shell/src/main/java/org/apache/sqoop/shell/ShowOptionFunction.java 5e3c3ff9469ee75d6b9d7635de66b033e93c37cd 
>   shell/src/main/java/org/apache/sqoop/shell/ShowServerFunction.java ec97e637937129ff0e2151612f98eceb284ec126 
>   shell/src/main/java/org/apache/sqoop/shell/ShowSubmissionFunction.java a592a9861f01d333ef72f1f96bdf038ab334ea9e 
>   shell/src/main/java/org/apache/sqoop/shell/ShowVersionFunction.java 764b754180500a86501450c90b119813de6cf1f7 
>   shell/src/main/java/org/apache/sqoop/shell/SqoopFunction.java 675a796d7919a3afadea2e14a88f7823d5dced47 
>   shell/src/main/java/org/apache/sqoop/shell/StartJobFunction.java 02148de497c15caa363c17a54202690a9026a68b 
>   shell/src/main/java/org/apache/sqoop/shell/StatusJobFunction.java be0de8c29289a904cfc00361da7fbf9a6c8e7d1c 
>   shell/src/main/java/org/apache/sqoop/shell/StopJobFunction.java 6c0e3c284b997561fc351a57e35ce2d6c77f6121 
>   shell/src/main/java/org/apache/sqoop/shell/UpdateConnectionFunction.java c062fe6781aebac15c4d59b5690772695d8a10a9 
>   shell/src/main/java/org/apache/sqoop/shell/UpdateJobFunction.java da1e0c570fb43cea439549c0ab5268f67d55996d 
>   shell/src/main/java/org/apache/sqoop/shell/utils/ConnectionDynamicFormOptions.java PRE-CREATION 
>   shell/src/main/java/org/apache/sqoop/shell/utils/DynamicFormOptions.java PRE-CREATION 
>   shell/src/main/java/org/apache/sqoop/shell/utils/FormFiller.java 9bc0b93649cb2ae6c84228b52c04b60a36c13b18 
>   shell/src/main/java/org/apache/sqoop/shell/utils/FormOptions.java PRE-CREATION 
>   shell/src/main/java/org/apache/sqoop/shell/utils/JobDynamicFormOptions.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13181/diff/
> 
> 
> Testing
> -------
> 
> Executed the following commands in a file:
> 
> reate connection --cid 1 --name mysql-test --connector-connection-jdbcDriver com.mysql.jdbc.Driver --connector-connection-connectionString jdbc:mysql://hu\
> e.ent.cloudera.com/test --connector-connection-username root --connector-connection-password root
> show connection
> create job --xid 1 --type import --name mysql-import-job1 --connector-table-tableName test --connector-table-partitionColumn a --framework-output-storageTy\
> pe 0 --framework-output-outputFormat 0 --framework-output-outputDirectory /tmp/output
> show job
> start job --jid 1
> 
> 
> Thanks,
> 
> Abraham Elmahrek
> 
>