Reply
New Contributor
Posts: 7
Registered: ‎08-05-2014
Accepted Solution

Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

I have installed cloudera sqoop2 in my single node machine. It works fine while importing tables from RDBMS.  I want to zip my output file in HDFS. But I sqoop2 is not giving me the zip option while creating job in output configuration. After showing Database Configurations it is directly showing output directory options. Its missing out the zip option to choose from. Kindly help me ,. Thanks in advance. 

Cloudera Employee abe
Cloudera Employee
Posts: 109
Registered: ‎08-08-2013

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

I don't think the Zip is implemented in the MR framework. You'd have to implement Zip as a custom compression codec. Try extending DefaultCodec (https://hadoop.apache.org/docs/current/api/org/apache/hadoop/io/compress/DefaultCodec.html).
New Contributor
Posts: 7
Registered: ‎08-05-2014

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Thanks for the response Abe. But if you see this link sqoop2 import, while creating an import job, after "Database Configuration" in the "Output Configuration" sqoop2 displays an option to choose the compression format. But in my cloudera sqoop2 installation I am not able to view that option. After choosing the "output format", its directly showing the "Output Directory". Its not showing me the Compression Format option. Thanks in advance.

Cloudera Employee abe
Cloudera Employee
Posts: 109
Registered: ‎08-08-2013

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

What version of Sqoop2/CDH are you using?
New Contributor
Posts: 7
Registered: ‎08-05-2014

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Hi Abe. I am using Sqoop 1.99.2-cdh4.7.0. Am I missing something to install? Thanks in advance.

Cloudera Employee abe
Cloudera Employee
Posts: 109
Registered: ‎08-08-2013

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

https://issues.apache.org/jira/browse/SQOOP-1182

It looks like this was in for SQOOP-1.99.3. Also, CDH4.7.0 did not have any backports... so it is likely just not part of this release.

It did make it into CDH 5 release though. So upgrading should fix this problem.
Highlighted
New Contributor
Posts: 7
Registered: ‎08-05-2014

Re: Not getting zip option in cloudera sqoop2 while importing data from RDBMS into HDFS

Thank yoiu  for the response Abe. I will try it in CDH5.

Announcements
New solutions