sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Cecho" <jar...@apache.org>
Subject Re: Review Request: Sqoop2: Introduce synchronous job submission to Client API
Date Fri, 03 May 2013 05:08:46 GMT


> On May 2, 2013, 12:50 a.m., Jarek Cecho wrote:
> > client/src/main/java/org/apache/sqoop/client/SqoopClient.java, line 355
> > <https://reviews.apache.org/r/10869/diff/2/?file=286264#file286264line355>
> >
> >     What about rather then creating one method that can do both synchronous and
asynchronous job submission create method startSubmission(long jid) for synchronous mode and
startSubmission(long jid, callback, long polltime) for asynchronous mode? I think that there
is no need for the Long object, I would personally require caller to specify a poll period
if synchronous mode is required. I would also like to expose callback that will be called
every poll period with updated MSubmission object so that user code can react on that. We
can easily reuse such callback in client shell to print out updated status.
> 
> vasanthkumar wrote:
>     Hi Jarcec,
>     Ok. can we have startSubmission(long jid, callback, long polltime) for synchronous?
Given asynchoronous. Need to create seperate class Callback or  callback inner class of SqoopClient?
We can have negative value for poll period and updated to client only after job finish.

Those are really good questions Vasanth! I think that having negative value for poll period
is invalid and thus I would throw an exception. We could potentially allow the callback to
be null and in such case we would not be calling user defined function at all. Do you think
that it would be beneficial? If you do not mind, I would prefer to have the callback interface
as a separate interface so that we could potentially reuse somewhere else if needed (I'm not
sure if that will be the case though).


- Jarek


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


On April 30, 2013, 7:56 p.m., vasanthkumar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10869/
> -----------------------------------------------------------
> 
> (Updated April 30, 2013, 7:56 p.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Description
> -------
> 
> Synchronous job submission to Client API.
> 
> 
> This addresses bug SQOOP-985.
>     https://issues.apache.org/jira/browse/SQOOP-985
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/sqoop/client/SqoopClient.java f9137bb 
>   client/src/main/java/org/apache/sqoop/client/shell/SubmissionStartFunction.java f68ac11

>   docs/src/site/sphinx/ClientAPI.rst a9d39fb 
>   test/src/test/java/org/apache/sqoop/integration/connector/jdbc/generic/TableImportTest.java
adcfbaf 
> 
> Diff: https://reviews.apache.org/r/10869/diff/
> 
> 
> Testing
> -------
> 
> Done
> 
> 
> Thanks,
> 
> vasanthkumar
> 
>


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