Reply
Highlighted
Contributor
Posts: 40
Registered: ‎09-26-2014
Accepted Solution

Sqoop Queryresult.jar rename

Hi guys,

 have anybody tried to rename the output of the sqoop import command? It is always named as QueryResult.jar.

When we run multiple sqoop import commands in parallel, in Cloudera Manager the Yarn applications does not distinct between them, every command is named as QueryResult.jar.

 

The sqoop import command looks like:

 

sqoop import --connect jdbc:sqlserver://OUR.SQL.SERVER.COM --username XXX --query 'select * from XXXXZZZ where Start_Time >= getdate()-7 and $CONDITIONS' -m 6 --split-by Start_Time --as-textfile --fields-terminated-by '\t' --delete-target-dir -z --target-dir /user/sql2hadoop/ext_xxxxzzzz

 

sqoop import --connect jdbc:sqlserver://OUR.SQL.SERVER.COM --username XXX --query 'select * from XXXXYYY where Start_Time >= getdate()-7 and $CONDITIONS' -m 6 --split-by Start_Time --as-textfile --fields-terminated-by '\t' --delete-target-dir -z --target-dir /user/sql2hadoop/ext_xxxxyyyyyy

 

I would like to see in YARN that for example there are two applications running: Import_XXXZZZ.jar and Import_XXXXYYY.jar

 

Is there any parameter for setting the application name?

Thanks

 

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

Re: Sqoop Queryresult.jar rename

Hey there,

 

Have you fiddled with the code generation options? I think you're looking for "--class-name".

 

http://sqoop.apache.org/docs/1.4.5/SqoopUserGuide.html#idp6782480

 

-Abe

Contributor
Posts: 40
Registered: ‎09-26-2014

Re: Sqoop Queryresult.jar rename

Works great! Simply setting the --class-name overrides the name of the jar file.

Thanks!

 

Announcements
New solutions