Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop Queryresult.jar rename

Solved Go to solution

Sqoop Queryresult.jar rename

Rising Star

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

Accepted Solutions
Highlighted

Re: Sqoop Queryresult.jar rename

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

Re: Sqoop Queryresult.jar rename

Rising Star

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

Thanks!

 

2 REPLIES 2
Highlighted

Re: Sqoop Queryresult.jar rename

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

Re: Sqoop Queryresult.jar rename

Rising Star

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

Thanks!