Return-Path: X-Original-To: apmail-sqoop-dev-archive@www.apache.org Delivered-To: apmail-sqoop-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2EE1D6D2 for ; Sat, 3 Nov 2012 05:18:24 +0000 (UTC) Received: (qmail 16215 invoked by uid 500); 3 Nov 2012 05:18:24 -0000 Delivered-To: apmail-sqoop-dev-archive@sqoop.apache.org Received: (qmail 16114 invoked by uid 500); 3 Nov 2012 05:18:24 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 16099 invoked by uid 500); 3 Nov 2012 05:18:23 -0000 Delivered-To: apmail-incubator-sqoop-dev@incubator.apache.org Received: (qmail 16088 invoked by uid 99); 3 Nov 2012 05:18:23 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Nov 2012 05:18:23 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 9178A1C4655; Sat, 3 Nov 2012 05:18:20 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4116022449317764792==" MIME-Version: 1.0 Subject: Re: Review Request: SQOOP-604 Easy throttling feature for MySQL exports From: "Abhijeet Gaikwad" To: =?utf-8?q?Zolt=C3=A1n_T=C3=B3th-Czifra?= , Abhijeet Gaikwad , Sqoop Date: Sat, 03 Nov 2012 05:18:20 -0000 Message-ID: <20121103051820.9682.96073@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Abhijeet Gaikwad" X-ReviewGroup: Sqoop X-ReviewRequest-URL: https://reviews.apache.org/r/7135/ X-Sender: "Abhijeet Gaikwad" References: <20121102123251.9681.76657@reviews.apache.org> In-Reply-To: <20121102123251.9681.76657@reviews.apache.org> Reply-To: "Abhijeet Gaikwad" --===============4116022449317764792== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- 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=C3=A1n T=C3=B3th-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/SQOO= P-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 m= ake the thread sleep for X milliseconds at the checkbpoints. With low enoug= h 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/se= c) > 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 "envi= ronment" object that could be injected to these classes as mocks that could= take care of time-related fixtures. > = > = > Thanks, > = > Zolt=C3=A1n T=C3=B3th-Czifra > = > --===============4116022449317764792==--