You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Zoltán Tóth-Czifra <gp...@vipmail.hu> on 2012/11/02 13:32:51 UTC
Re: Review Request: SQOOP-604 Easy throttling feature for MySQL exports
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7135/
-----------------------------------------------------------
(Updated Nov. 2, 2012, 12:32 p.m.)
Review request for Sqoop.
Changes
-------
Sure thing, I'm sorry. Checkstyle passes now with my changes.
Description
-------
Code review for SQOOP-604, see https://issues.apache.org/jira/browse/SQOOP-604
The solution in short: Using the already existing "checkpoint" feature of the direct (--direct) MySQL exports (the export process is restarted every X bytes written), extending it with a new config value that would simply make the thread sleep for X milliseconds at the checkbpoints. With low enough byte count limit this can be a simple yet powerful throttling mechanism.
Diffs (updated)
-----
src/java/org/apache/sqoop/mapreduce/MySQLExportMapper.java a4e8b88
Diff: https://reviews.apache.org/r/7135/diff/
Testing
-------
Executing with different settings of sqoop.mysql.export.checkpoint.bytes and sqoop.mysql.export.sleep.ms:
33554432B / 0ms: Transferred 4.7579 MB in 8.7175 seconds (558.8826 KB/sec)
102400B / 500ms: Transferred 4.7579 MB in 35.7794 seconds (136.1698 KB/sec)
51200B / 500ms: Transferred 4.758 MB in 57.8675 seconds (84.1959 KB/sec)
51200B / 250ms: Transferred 4.7579 MB in 35.0293 seconds (139.0854 KB/sec)
I did not add unit tests yet and as it involves calling to Thread.sleep, I find testing this difficult. Unfortunately there is no "machine" or "environment" object that could be injected to these classes as mocks that could take care of time-related fixtures.
Thanks,
Zoltán Tóth-Czifra
Re: Review Request: SQOOP-604 Easy throttling feature for MySQL exports
Posted by Zoltán Tóth-Czifra <gp...@vipmail.hu>.
> On Nov. 3, 2012, 5:18 a.m., Abhijeet Gaikwad wrote:
> > Looks good :)
> > ant checkstyle - no errors
> > ant test - success
Thank you for your help Abhijeet!
- Zoltán
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7135/#review13075
-----------------------------------------------------------
On Nov. 2, 2012, 12:32 p.m., Zoltán Tóth-Czifra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7135/
> -----------------------------------------------------------
>
> (Updated Nov. 2, 2012, 12:32 p.m.)
>
>
> Review request for Sqoop.
>
>
> Description
> -------
>
> Code review for SQOOP-604, see https://issues.apache.org/jira/browse/SQOOP-604
>
> The solution in short: Using the already existing "checkpoint" feature of the direct (--direct) MySQL exports (the export process is restarted every X bytes written), extending it with a new config value that would simply make the thread sleep for X milliseconds at the checkbpoints. With low enough byte count limit this can be a simple yet powerful throttling mechanism.
>
>
> Diffs
> -----
>
> src/java/org/apache/sqoop/mapreduce/MySQLExportMapper.java a4e8b88
>
> Diff: https://reviews.apache.org/r/7135/diff/
>
>
> Testing
> -------
>
> Executing with different settings of sqoop.mysql.export.checkpoint.bytes and sqoop.mysql.export.sleep.ms:
>
> 33554432B / 0ms: Transferred 4.7579 MB in 8.7175 seconds (558.8826 KB/sec)
> 102400B / 500ms: Transferred 4.7579 MB in 35.7794 seconds (136.1698 KB/sec)
> 51200B / 500ms: Transferred 4.758 MB in 57.8675 seconds (84.1959 KB/sec)
> 51200B / 250ms: Transferred 4.7579 MB in 35.0293 seconds (139.0854 KB/sec)
>
> I did not add unit tests yet and as it involves calling to Thread.sleep, I find testing this difficult. Unfortunately there is no "machine" or "environment" object that could be injected to these classes as mocks that could take care of time-related fixtures.
>
>
> Thanks,
>
> Zoltán Tóth-Czifra
>
>
Re: Review Request: SQOOP-604 Easy throttling feature for MySQL exports
Posted by Abhijeet Gaikwad <ab...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7135/#review13075
-----------------------------------------------------------
Ship it!
Looks good :)
ant checkstyle - no errors
ant test - success
- Abhijeet Gaikwad
On Nov. 2, 2012, 12:32 p.m., Zoltán Tóth-Czifra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7135/
> -----------------------------------------------------------
>
> (Updated Nov. 2, 2012, 12:32 p.m.)
>
>
> Review request for Sqoop.
>
>
> Description
> -------
>
> Code review for SQOOP-604, see https://issues.apache.org/jira/browse/SQOOP-604
>
> The solution in short: Using the already existing "checkpoint" feature of the direct (--direct) MySQL exports (the export process is restarted every X bytes written), extending it with a new config value that would simply make the thread sleep for X milliseconds at the checkbpoints. With low enough byte count limit this can be a simple yet powerful throttling mechanism.
>
>
> Diffs
> -----
>
> src/java/org/apache/sqoop/mapreduce/MySQLExportMapper.java a4e8b88
>
> Diff: https://reviews.apache.org/r/7135/diff/
>
>
> Testing
> -------
>
> Executing with different settings of sqoop.mysql.export.checkpoint.bytes and sqoop.mysql.export.sleep.ms:
>
> 33554432B / 0ms: Transferred 4.7579 MB in 8.7175 seconds (558.8826 KB/sec)
> 102400B / 500ms: Transferred 4.7579 MB in 35.7794 seconds (136.1698 KB/sec)
> 51200B / 500ms: Transferred 4.758 MB in 57.8675 seconds (84.1959 KB/sec)
> 51200B / 250ms: Transferred 4.7579 MB in 35.0293 seconds (139.0854 KB/sec)
>
> I did not add unit tests yet and as it involves calling to Thread.sleep, I find testing this difficult. Unfortunately there is no "machine" or "environment" object that could be injected to these classes as mocks that could take care of time-related fixtures.
>
>
> Thanks,
>
> Zoltán Tóth-Czifra
>
>