'InterruptedException' when importing Oracle data to HDFS with a tSqoopImport component

Problem Description

When executing a Talend 6.3.1 Job that uses a tSqoopImport component to transfer data from the Oracle server into HDFS (of Cloudera Hadoop Cluster (CDH; 5.8)), it fails with the following exception stack:

[ERROR]: org.apache.sqoop.tool.ImportTool - Encountered IOException running import job: java.io.IOException: java.lang.InterruptedException
	at org.apache.hadoop.ipc.Client.call(Client.java:1456)
	at org.apache.hadoop.ipc.Client.call(Client.java:1408)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:230)
	at com.sun.proxy.$Proxy9.delete(Unknown Source)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.delete(ClientNamenodeProtocolTranslatorPB.java:531)
..	
	at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:273)
	at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:692)
	at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:445)
	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:507)
	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
	at org.apache.sqoop.Sqoop.run(Sqoop.java:143)	

 

Root Cause

The Apache, Sqoop User Guide (v1.4.6) page states:

"This problem occurs primarily due to the lack of a fast random number generation device on the host where the map tasks execute."

 

Solution

Add the Java property java.security.egd, set to /dev/../dev/urandom, to the JVM that executes the Job, by performing the following steps:
  1. From Studio, select your Job.

  2. Click Run, then Advanced settings.

  3. Select the Use specific JVM arguments check box.

  4. Click New, and in the Argument field, add the following:

    -Djava.security.egd=file:/dev/../dev/urandom
Version history
Revision #:
6 of 6
Last update:
‎03-01-2019 04:42 AM
Updated by:
 
Contributors
Comments
Employee

Nice Article. Thank you for the solution!!