Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop, mail # dev - Review Request 13181: SQOOP-773 Sqoop2: Batch execution support for client commands


Copy link to this message
-
Re: Review Request 13181: SQOOP-773 Sqoop2: Batch execution support for client commands
Jarek Cecho 2013-10-14, 14:52


> On Oct. 11, 2013, 8:02 p.m., Jarek Cecho wrote:
> > Hi Abe,
> > thank you very much for working on the patch, appreciated! I've tested it in my environment and I do have couple of notes:
> >
> > I think that we need to ensure that one failed command will end entire script execution. I'm thinking about use case that would do the following:
> >
> > 1) create connection
> > 2) create job for -^
> > 3) run the job -^
> >
> > In such situation we need to ensure that we are not creating job for non-existing connection or running non-existing job.
>
> Abraham Elmahrek wrote:
>     Thanks for the review Jarcec. Would it be appropriate to have executeFunction and its parent callers return a boolean value rather than an Object value? I think an Object value would be useful, but perhaps a more abstracted Object value that we could handle in a follow up jira. i.e. A class that contains a Status and a return object?

The reason why the executeFunction() methods are returning Object instead of boolean is that it's expected by Groovy shell. Having said that I would prefer to return what is expected from us, rather then limit it to a boolean value only.
> On Oct. 11, 2013, 8:02 p.m., Jarek Cecho wrote:
> > shell/src/main/java/org/apache/sqoop/shell/CloneConnectionFunction.java, lines 107-115
> > <https://reviews.apache.org/r/13181/diff/6/?file=359340#file359340line107>
> >
> >     Can we make this and similar code a bit more verbose?
> >    
> >     I've tried following script:
> >    
> >     create connection --cid 1 --name NameX
> >    
> >     And I got following output:
> >    
> >     [root@bousa-trunk sqoop]# ./bin/sqoop.sh client create.sqoop
> >     Sqoop home directory: /root/sqoop
> >     sqoop:000> create connection --cid 1 --name NameX
> >     Creating connection for connector with id 1
> >     [root@bousa-trunk sqoop]#
> >    
> >     Creating the connection has failed as I did not specified any arguments, but there is no error message which is really confusing.
>
> Abraham Elmahrek wrote:
>     I see FormFiller#printValidationMessage exists to aid in printing error messages. Can I simply re-use this for the time being? I think a more appropriate response would be to describe what exactly is missing (cf. help), but it seems fine to focus on one thing in this jira? The error output would look like:
>     Error message: Driver can't be empty
>     Error message: JDBC URL can't be empty

Yeah, that seems good, let's try to reuse that!
- Jarek
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13181/#review26935
-----------------------------------------------------------
On Sept. 27, 2013, 6:30 p.m., Abraham Elmahrek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13181/
> -----------------------------------------------------------
>
> (Updated Sept. 27, 2013, 6: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 080ced16578c1d95015ce3e99b4335beb465861a
> Author: Abraham Elmahrek <[EMAIL PROTECTED]>
> Date:   Tue Aug 13 14:14:06 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 980a908... a7e7e7d... M  shell/src/main/java/org/apache/sqoop/shell/CloneCommand.java
> :100644 100644 856abaa... 2c2869c... M  shell/src/main/java/org/apache/sqoop/shell/CloneConnectionFunction.java