AnsweredAssumed Answered

sqoop error in import data

Question asked by Punith on Apr 18, 2017
Latest reply on May 8, 2017 by DUCNGO

i try import data from mysql DB  but its getting error

 

sqoop import -connect jdbc:mysql://localhost/pravahya -username root -P --table pet

 

Enter password:
17/04/18 18:40:42 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
17/04/18 18:40:42 INFO tool.CodeGenTool: Beginning code generation
17/04/18 18:40:42 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `pet` AS t LIMIT 1
17/04/18 18:40:42 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `pet` AS t LIMIT 1
17/04/18 18:40:42 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/mapr/hadoop/hadoop-2.7.0
17/04/18 18:40:42 ERROR orm.CompilationManager: It seems as though you are running sqoop with a JRE.
17/04/18 18:40:42 ERROR orm.CompilationManager: Sqoop requires a JDK that can compile Java code.
17/04/18 18:40:42 ERROR orm.CompilationManager: Please install a JDK and set $JAVA_HOME to use it.
17/04/18 18:40:42 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Could not start Java compiler.
    at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:187)
    at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:108)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:606)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

 

thanks

punith vp

Outcomes