From dev-return-10825-apmail-sqoop-dev-archive=sqoop.apache.org@sqoop.apache.org Sun May 4 17:10:44 2014 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 E98281139B for ; Sun, 4 May 2014 17:10:44 +0000 (UTC) Received: (qmail 47221 invoked by uid 500); 4 May 2014 17:10:44 -0000 Delivered-To: apmail-sqoop-dev-archive@sqoop.apache.org Received: (qmail 47160 invoked by uid 500); 4 May 2014 17:10:44 -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 47152 invoked by uid 99); 4 May 2014 17:10:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 May 2014 17:10:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [194.228.2.92] (HELO smtp-out4.iol.cz) (194.228.2.92) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 May 2014 17:10:37 +0000 Received: from antivir6.iol.cz (unknown [192.168.30.215]) by smtp-out4.iol.cz (Postfix) with ESMTP id 70E9ACE40D6; Sun, 4 May 2014 19:10:15 +0200 (CEST) Received: from localhost (antivir6.iol.cz [127.0.0.1]) by antivir6.iol.cz (Postfix) with ESMTP id 586117200A0; Sun, 4 May 2014 19:10:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Received: from antivir6.iol.cz ([127.0.0.1]) by localhost (antivir6.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id sDEUVW+78SHs; Sun, 4 May 2014 19:10:15 +0200 (CEST) Received: from port6.iol.cz (unknown [192.168.30.96]) by antivir6.iol.cz (Postfix) with ESMTP id 26BE972009E; Sun, 4 May 2014 19:10:15 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkKAC90ZlNK2UwL/2dsb2JhbABYg1WCbsJMAgKBJXSCJQEBBXkMBAgDEQQBAQEJHgcPBQ0lCSGILQMRBQjDMA2GRBeMO4IXBwYQgxSBFQSKB407gXGBPYURhkqFXYNUHTABAQ X-IPAS-Result: AhkKAC90ZlNK2UwL/2dsb2JhbABYg1WCbsJMAgKBJXSCJQEBBXkMBAgDEQQBAQEJHgcPBQ0lCSGILQMRBQjDMA2GRBeMO4IXBwYQgxSBFQSKB407gXGBPYURhkqFXYNUHTABAQ X-IronPort-AV: E=Sophos;i="4.97,982,1389740400"; d="asc'?scan'208";a="581212155" Received: from pp011.core.cloudera.com (HELO localhost) ([74.217.76.11]) by smtp.iol.cz with ESMTP/TLS/DHE-RSA-AES128-SHA; 04 May 2014 19:10:09 +0200 Date: Sun, 4 May 2014 10:09:25 -0700 From: Jarek Jarcec Cecho To: dev@sqoop.apache.org Cc: "shuja@pucit.edu.pk" Subject: Re: Sqoop Import Using Java Code Message-ID: <20140504170925.GA16316@localhost> References: <7BE8A3C881ABA64890DAA07FC103B08304E2BEE3@xmb-aln-x05.cisco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <7BE8A3C881ABA64890DAA07FC103B08304E2BEE3@xmb-aln-x05.cisco.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Checked: Checked by ClamAV on apache.org --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Nauman, Sqoop 1 do not have supported Java API and hence there might be a lot of tr= oubles on the way that you will have to sort out. We've addressed this in S= qoop 2 where we have first class client API [1]. Having said that, you can get execute Sqoop and get it's classpath to see w= hat all jars you will need. Jarcec Links: 1: http://sqoop.apache.org/docs/1.99.3/ClientAPI.html On Fri, May 02, 2014 at 03:01:51PM +0000, Ajay Chitre -X (achitre - PERSIST= ENT SYSTEMS INC at Cisco) wrote: > If you're using Maven use a dependency such as this: >=20 > > org.apache.sqoop > sqoop > 1.4.4 > > =20 >=20 > If you're not using Maven, consider using it. It will help you tremendou= sly in the long run. Hope this helps. Thanks. >=20 >=20 > -----Original Message----- > From: Nauman Zahid [mailto:nauman.goldsmith@gmail.com]=20 > Sent: Thursday, May 01, 2014 10:23 AM > To: dev@sqoop.apache.org > Cc: shuja@pucit.edu.pk > Subject: Sqoop Import Using Java Code >=20 > Hello! > I am using the following code to try to import data from mysql database to > Hbase: > SqoopOptions options =3D new SqoopOptions(); > options.setConnectString("jdbc:mysql://localhost:3306/testDb"); > options.setTableName("student"); > //options.setWhereClause("id>10"); // this where clause works > when importing whole table, ie when setTableName() is used > options.setUsername("root"); > options.setPassword(""); > //options.setDirectMode(true); // Make sure the direct mode is > off when importing data to HBase > options.setNumMappers(8); // Default value is 4 >=20 >=20 > // HBase options > options.setHBaseTable("HBASE_student"); > options.setHBaseColFamily("colFamily"); > options.setCreateHBaseTable(true); // Create HBase table, if it > does not exist > options.setHBaseRowKeyColumn("stdId"); >=20 > @SuppressWarnings({ "unused" }) > int ret =3D new ImportTool().run(options); >=20 > Could you please tell me which jars (plz be specific with the versions) I= have to include in my class path. I have tried a number of combination but= in the end I end up in a conflict. >=20 > Regards. --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJTZnREAAoJEEk45sAabwqGDXcQAKRNv7Dt//UR4IGVG4KNncto EAbpBFjQmwtdZY7SdMjud7jKknUmxqOao2i+kwOE8QV77VzfRyysmy8+uyaaxJY4 vSioH4mXjcyygCJIrQvL8LSYpsR2xY847ZNqPrMipjGPaMIqopvlj+3TbFEkCH/n 2/d/upSoI+S4gxvJ47+KVSwbxjxzQ3cOf1kv6DupjeADe8tm0A2pbjlTMBJE3yZU CffJqOXBz3n1FzAp237cfjBR1FAbQrmAnSF20wbdtnM3b2ccZKc0ugJp1ZFvYddu 6P+3pNzH2IcpD+ppmoNnvq5rkEBuPr/d6WfdyR2inHin24h5tcWr4+ZFBhsDMziZ 7S/Lo23+r1AhBSxawlOICwI/MUPjvW2ylPFgNwIrQ70c7XwEwyQejjbT8Bn/pacF r9NFIiExH0dPot/P4+onrJpOBX5HnqUAg6gMO9XTfQZl/RbECzGrG0op6IlRF+aK XxjkqE28/jp310pv7Ev0IXYdaobqWDghzVwOAmkDpdUkLXAtz5xTsknZbPP/w/j3 mldvcMYyRJKbSmAl+eJfGFOnnoQEv/KzLU/jLVfaOFndIuM1hVV4Fg/5qSvQe5Ev 6SoWV1gtxvRNDD1jJRei2MQ+UDopValY0TDxihgBZwQ/f8IohGIMW0Hb+tdfSS0F tpuVtX2lf91jvCCx8g25 =Rl8U -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY--