sqoop2 版本是 1.99.5, CDH-5.11.1
我创建了2个link 分别是:
mysql_link_124:
sqoop:000> show link -l 1
1 link(s) to show:
link with id 1 and name mysql_link_124 (Enabled: true, Created by root at 7/21/17 11:09 AM, Updated by root at 7/21/17 5:52 PM)
Using Connector generic-jdbc-connector with id 1
Link configuration
JDBC Driver Class: com.mysql.jdbc.Driver
JDBC Connection String: jdbc:mysql://192.168.16.14:3306/test
Username: root
Password:
JDBC Connection Properties:
protocol = tcp
hdfs_link:
sqoop:000> show link -l 2
1 link(s) to show:
link with id 2 and name cloudera1_hdfs_link (Enabled: true, Created by root at 7/21/17 11:11 AM, Updated by root at 7/21/17 11:11 AM)
Using Connector hdfs-connector with id 3
Link configuration
HDFS URI: hdfs://192.168.16.162:8020
创建的job为:
sqoop:000> show job -j 1
1 job(s) to show:
Job with id 1 and name mysql_to_hdfs (Enabled: true, Created by root at 7/21/17 11:44 AM, Updated by root at 7/21/17 6:29 PM)
Using link id 1 and Connector id 1
From database configuration
Schema name:
Table name: people
Table SQL statement:
Table column names:
Partition column name: id
Null value allowed for the partition column:
Boundary query:
Throttling resources
Extractors: 2
Loaders: 2
ToJob configuration
Override null value:
Null value:
Output format: TEXT_FILE
Compression format: NONE
Custom compression format:
Output directory: /user/sqoop2/
然后我执行 job时 报如下错误
sqoop:000> start job -jid 1
0 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Exception has occurred during processing command
Exception: org.apache.sqoop.common.SqoopException Message: CLIENT_0001:Server has returned exception - <html><head><title>Apache Tomcat/6.0.48 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Servlet execution threw an exception</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Servlet execution threw an exception</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Servlet execution threw an exception
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:622)
org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:301)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
</pre></p><p><b>root cause</b> <pre>java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
org.apache.hadoop.mapreduce.Job.getJobSubmitter(Job.java:1291)
org.apache.hadoop.mapreduce.Job.submit(Job.java:1302)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submitToCluster(MapreduceSubmissionEngine.java:274)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submit(MapreduceSubmissionEngine.java:255)
org.apache.sqoop.driver.JobManager.start(JobManager.java:288)
org.apache.sqoop.handler.JobRequestHandler.startJob(JobRequestHandler.java:380)
org.apache.sqoop.handler.JobRequestHandler.handleEvent(JobRequestHandler.java:116)
org.apache.sqoop.server.v1.JobServlet.handlePutRequest(JobServlet.java:96)
org.apache.sqoop.server.SqoopProtocolServlet.doPut(SqoopProtocolServlet.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:622)
org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:301)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
</pre></p><p><b>root cause</b> <pre>java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
java.net.URLClassLoader.findClass(URLClassLoader.java:381)
java.lang.ClassLoader.loadClass(ClassLoader.java:424)
java.lang.ClassLoader.loadClass(ClassLoader.java:357)
org.apache.hadoop.mapreduce.Job.getJobSubmitter(Job.java:1291)
org.apache.hadoop.mapreduce.Job.submit(Job.java:1302)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submitToCluster(MapreduceSubmissionEngine.java:274)
org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.submit(MapreduceSubmissionEngine.java:255)
org.apache.sqoop.driver.JobManager.start(JobManager.java:288)
org.apache.sqoop.handler.JobRequestHandler.startJob(JobRequestHandler.java:380)
org.apache.sqoop.handler.JobRequestHandler.handleEvent(JobRequestHandler.java:116)
org.apache.sqoop.server.v1.JobServlet.handlePutRequest(JobServlet.java:96)
org.apache.sqoop.server.SqoopProtocolServlet.doPut(SqoopProtocolServlet.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:622)
org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:301)
org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.48 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.48</h3></body></html>
|
-
mysql_link
|