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 export hangs at 95% for oracle Database

Solved Go to solution

Sqoop export hangs at 95% for oracle Database

Rising Star

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

Accepted Solutions

Re: Sqoop export hangs at 95% for oracle Database

Rising Star

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

7 REPLIES 7

Re: Sqoop export hangs at 95% for oracle Database

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.

Re: Sqoop export hangs at 95% for oracle Database

Rising Star

@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

Re: Sqoop export hangs at 95% for oracle Database

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.

Re: Sqoop export hangs at 95% for oracle Database

Mentor

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

Re: Sqoop export hangs at 95% for oracle Database

Mentor

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

Re: Sqoop export hangs at 95% for oracle Database

Rising Star

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

Re: Sqoop export hangs at 95% for oracle Database

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