分享

sqoop导mysql数据报错--求解决

caoxuu 发表于 2016-4-14 16:32:52 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 10151
sqoop-1.99.6 ,mysql 5.1.73,导数据的时候报下面的错,主要是报这个Caused by: Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0005:No column is found to partition data -
请问各位大神有没有解决办法呀:

sqoop:000> start job -j 2 -s
Exception has occurred during processing command
Exception: org.apache.sqoop.common.SqoopException Message: CLIENT_0001:Server has returned exception
Stack trace:
         at  org.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:129)  
         at  org.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:179)  
         at  org.apache.sqoop.client.request.JobResourceRequest (JobResourceRequest.java:112)  
         at  org.apache.sqoop.client.request.SqoopResourceRequests (SqoopResourceRequests.java:157)  
         at  org.apache.sqoop.client.SqoopClient (SqoopClient.java:473)  
         at  org.apache.sqoop.shell.StartJobFunction (StartJobFunction.java:75)  
         at  org.apache.sqoop.shell.SqoopFunction (SqoopFunction.java:51)  
         at  org.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:135)  
         at  org.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:111)  
         at  org.codehaus.groovy.tools.shell.Command$execute (null:-1)  
         at  org.codehaus.groovy.runtime.callsite.CallSiteArray (CallSiteArray.java:42)  
         at  org.codehaus.groovy.tools.shell.Command$execute (null:-1)  
         at  org.codehaus.groovy.tools.shell.Shell (Shell.groovy:101)  
         at  org.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:-1)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)  
         at  sun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)  
         at  java.lang.reflect.Method (Method.java:497)  
         at  org.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)  
         at  groovy.lang.MetaMethod (MetaMethod.java:233)  
         at  groovy.lang.MetaClassImpl (MetaClassImpl.java:1054)  
         at  org.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)  
         at  org.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:173)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)  
         at  sun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)  
         at  java.lang.reflect.Method (Method.java:497)  
         at  org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce (PogoMetaMethodSite.java:267)  
         at  org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite (PogoMetaMethodSite.java:52)  
         at  org.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:141)  
         at  org.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:121)  
         at  org.codehaus.groovy.tools.shell.Shell (Shell.groovy:114)  
         at  org.codehaus.groovy.tools.shell.Shell$leftShift$0 (null:-1)  
         at  org.codehaus.groovy.tools.shell.ShellRunner (ShellRunner.groovy:88)  
         at  org.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:-1)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)  
         at  sun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)  
         at  java.lang.reflect.Method (Method.java:497)  
         at  org.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)  
         at  groovy.lang.MetaMethod (MetaMethod.java:233)  
         at  groovy.lang.MetaClassImpl (MetaClassImpl.java:1054)  
         at  org.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)  
         at  org.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:148)  
         at  org.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:100)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)  
         at  sun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)  
         at  java.lang.reflect.Method (Method.java:497)  
         at  org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce (PogoMetaMethodSite.java:267)  
         at  org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite (PogoMetaMethodSite.java:52)  
         at  org.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:137)  
         at  org.codehaus.groovy.tools.shell.ShellRunner (ShellRunner.groovy:57)  
         at  org.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:-1)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)  
         at  sun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)  
         at  sun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)  
         at  java.lang.reflect.Method (Method.java:497)  
         at  org.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)  
         at  groovy.lang.MetaMethod (MetaMethod.java:233)  
         at  groovy.lang.MetaClassImpl (MetaClassImpl.java:1054)  
         at  org.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)  
         at  org.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:148)  
         at  org.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:66)  
         at  java_lang_Runnable$run (null:-1)  
         at  org.codehaus.groovy.runtime.callsite.CallSiteArray (CallSiteArray.java:42)  
         at  org.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:108)  
         at  org.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:112)  
         at  org.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:463)  
         at  org.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:402)  
         at  org.apache.sqoop.shell.SqoopShell (SqoopShell.java:130)  
Caused by: Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0005:No column is found to partition data -
Stack trace:
         at  org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:144)  
         at  org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:53)  
         at  org.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:41)  
         at  org.apache.sqoop.driver.JobManager (JobManager.java:449)  
         at  org.apache.sqoop.driver.JobManager (JobManager.java:372)  
         at  org.apache.sqoop.driver.JobManager (JobManager.java:276)  
         at  org.apache.sqoop.handler.JobRequestHandler (JobRequestHandler.java:380)  
         at  org.apache.sqoop.handler.JobRequestHandler (JobRequestHandler.java:116)  
         at  org.apache.sqoop.server.v1.JobServlet (JobServlet.java:96)  
         at  org.apache.sqoop.server.SqoopProtocolServlet (SqoopProtocolServlet.java:79)  
         at  javax.servlet.http.HttpServlet (HttpServlet.java:646)  
         at  javax.servlet.http.HttpServlet (HttpServlet.java:723)  
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:290)  
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)  
         at  org.apache.hadoop.security.authentication.server.AuthenticationFilter (AuthenticationFilter.java:574)  
         at  org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter (DelegationTokenAuthenticationFilter.java:269)  
         at  org.apache.hadoop.security.authentication.server.AuthenticationFilter (AuthenticationFilter.java:544)  
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:235)  
         at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)  
         at  org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:233)  
         at  org.apache.catalina.core.StandardContextValve (StandardContextValve.java:191)  
         at  org.apache.catalina.core.StandardHostValve (StandardHostValve.java:127)  
         at  org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:103)  
         at  org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java:109)  
         at  org.apache.catalina.connector.CoyoteAdapter (CoyoteAdapter.java:293)  
         at  org.apache.coyote.http11.Http11Processor (Http11Processor.java:861)  
         at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler (Http11Protocol.java:606)  
         at  org.apache.tomcat.util.net.JIoEndpoint$Worker (JIoEndpoint.java:489)  
         at  java.lang.Thread (Thread.java:745)  


已有(3)人评论

跳转到指定楼层
atsky123 发表于 2016-4-14 18:25:15
跟楼主的数据配置有关系
下面举例说明:

数据库配置
     Schema name: movies
     Table name: Movie
     Table SQL statement:
     Table column names: *id,column1,column2,...*
     Partition column name: *id*
     Boundary query:


楼主应该缺少上面的列
回复

使用道具 举报

dongnanyouwo 发表于 2016-4-14 20:02:34
不行可以用load data试试
回复

使用道具 举报

caoxuu 发表于 2016-4-15 09:07:31
atsky123 你的方法是对的,指定列就可以了,网上的教程都是没有指定这个地方的,太坑 了,或者是我建数据库的方法泽。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条