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 import command generate Java files automatically

Highlighted

Sqoop import command generate Java files automatically

Contributor

Hi Team,

When I run sqoop command to import tables from oracle, it will automatically generate a java file of same table name in the current path of local system. Following are my questions,

1. Why they are generated?

2. How can i change path for the same?

3. If i delete that java files does it impact on future operations?

4. How to restrict to generate it?

Please find attached screenshot for reference.

3206-capture.jpg

4 REPLIES 4

Re: Sqoop import command generate Java files automatically

New Contributor

i was also having the same Doubt can any one clarify me

,

i was also having the same doubt can any one clarify me

Re: Sqoop import command generate Java files automatically

New Contributor

Can someone share any info that you may have on this issue please?

Re: Sqoop import command generate Java files automatically

New Contributor

1. Why they are generated?

sqoop invokes map reduce program which is written in Java

2. How can i change path for the same?

By passing an argument to Sqoop command. ie. : --outdir

3. If i delete that java files does it impact on future operations?

Java class file will generate to import the data. Class file will get generated if you delete it and it is names after tablename.

Re: Sqoop import command generate Java files automatically

New Contributor

I am interested in the same issue. I kept getting this error when I ran an import command the second time, although the command eventually completed successfully.

19/05/21 11:41:12 ERROR orm.CompilationManager: Could not rename /tmp/sqoop-hive/compile/71c6a7a1adae560199851f6fbb29b992/vw_Dim_IPA.java to /home/hive/./vw_Dim_IPA.java. Error: Destination '/home/hive/./vw_Dim_IPA.java' already exists

vw_Dim_IPA is the source SQL table name.

My questions are:

  1. Does this error matter?
  2. Can I reuse those java files? I guess that there is a reason that those java files are not deleted automatically.