Support Questions

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

Sqoop export hangs at 95% for oracle Database

avatar
Expert Contributor

Sqoop version: 1.4.4.2.1.7.0-784

The following is the sqoop command that i used to export simple(comma separated) records .

sqoop-export --connect jdbc:oracle:thin:@ipaddress:1521:orcl --username user --password password --table EMP --columns EMPNO,ENAME,JOB,MGR --export-dir /sqooptest/export -m 1 --batch

The above command stucks at 95% and doesn't get completed.

1 ACCEPTED SOLUTION

avatar
Expert Contributor

The configuration variable "sqoop.export.records.per.statement" can be set to 1 as a workaround for this problem.

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

View solution in original post

7 REPLIES 7

avatar
Master Mentor

@Suresh Bonam did you check in the resourcemanager UI whether it is really stuck or just trying to complete the final reduce attempt? Also I recommend you try with --direct flag to take advantage of the Oracle accelerator for Sqoop, it should make your sqoop jobs a lot faster. Furthermore, you're passing --password that will appear in clear text in your job xml, consider using --password-file or -P to enter the password at the prompt.

avatar
Expert Contributor

@Artem Ervits

Now i changed sqoop command like this

sqoop-export --connect jdbc:oracle:thin:@ipaddress:orcl --username username -P --table EMP --columns EMPNO,ENAME,JOB,MGR --export-dir /sqooptest/export -m 1 --direct

Even , No result.It behaves same as i mentioned.

Current sqoop version: 15/12/31 11:18:33 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4.2.1.7.0-784

see the following error once. sqoop database hanging error

avatar
Master Mentor

@Suresh Bonam can you provide the job logs when you execute the command? Do you see any errors on the Oracle side? Please review all of the requirements for Oracle connector https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_data_connector_for_oracle_and_hadoop, permissions, roles, etc.

avatar
Master Mentor

@Suresh Bonam has this been resolved? Can you post your solution or accept best answer?

avatar
Master Mentor

Try increasing the number of mappers by appending --m 5 at the end instead on --m 1

avatar
Expert Contributor

The configuration variable "sqoop.export.records.per.statement" can be set to 1 as a workaround for this problem.

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

avatar
Master Mentor

Thanks @Suresh Bonam...I have accepted this as best answer.