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/05/02 02:49:59 UTC

Re: Review Request: Sqoop2: Introduce synchronous job submission to Client API

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


Hi Vasanth,
thank you very much for working on this JIRA.


client/src/main/java/org/apache/sqoop/client/SqoopClient.java
<https://reviews.apache.org/r/10869/#comment41296>

    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.


Jarcec

- Jarek Cecho


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
> 
>


Re: Review Request: Sqoop2: Introduce synchronous job submission to Client API

Posted by Jarek Cecho <ja...@apache.org>.

> 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
> 
>


Re: Review Request: Sqoop2: Introduce synchronous job submission to Client API

Posted by rj...@gmail.com.

> 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.

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.


- vasanthkumar


-----------------------------------------------------------
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
> 
>