Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Sqoop Queryresult.jar rename

avatar
Expert Contributor

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

 

2 ACCEPTED SOLUTIONS

avatar
Expert Contributor

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

View solution in original post

avatar
Expert Contributor

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

Thanks!

 

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

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

avatar
Expert Contributor

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

Thanks!