caoxuu 发表于 2016-4-14 16:32:52

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

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:
       atorg.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:129)
       atorg.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:179)
       atorg.apache.sqoop.client.request.JobResourceRequest (JobResourceRequest.java:112)
       atorg.apache.sqoop.client.request.SqoopResourceRequests (SqoopResourceRequests.java:157)
       atorg.apache.sqoop.client.SqoopClient (SqoopClient.java:473)
       atorg.apache.sqoop.shell.StartJobFunction (StartJobFunction.java:75)
       atorg.apache.sqoop.shell.SqoopFunction (SqoopFunction.java:51)
       atorg.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:135)
       atorg.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:111)
       atorg.codehaus.groovy.tools.shell.Command$execute (null:-1)
       atorg.codehaus.groovy.runtime.callsite.CallSiteArray (CallSiteArray.java:42)
       atorg.codehaus.groovy.tools.shell.Command$execute (null:-1)
       atorg.codehaus.groovy.tools.shell.Shell (Shell.groovy:101)
       atorg.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:-1)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)
       atsun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)
       atjava.lang.reflect.Method (Method.java:497)
       atorg.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)
       atgroovy.lang.MetaMethod (MetaMethod.java:233)
       atgroovy.lang.MetaClassImpl (MetaClassImpl.java:1054)
       atorg.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)
       atorg.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:173)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)
       atsun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)
       atjava.lang.reflect.Method (Method.java:497)
       atorg.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce (PogoMetaMethodSite.java:267)
       atorg.codehaus.groovy.runtime.callsite.PogoMetaMethodSite (PogoMetaMethodSite.java:52)
       atorg.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:141)
       atorg.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:121)
       atorg.codehaus.groovy.tools.shell.Shell (Shell.groovy:114)
       atorg.codehaus.groovy.tools.shell.Shell$leftShift$0 (null:-1)
       atorg.codehaus.groovy.tools.shell.ShellRunner (ShellRunner.groovy:88)
       atorg.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:-1)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)
       atsun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)
       atjava.lang.reflect.Method (Method.java:497)
       atorg.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)
       atgroovy.lang.MetaMethod (MetaMethod.java:233)
       atgroovy.lang.MetaClassImpl (MetaClassImpl.java:1054)
       atorg.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)
       atorg.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:148)
       atorg.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:100)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)
       atsun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)
       atjava.lang.reflect.Method (Method.java:497)
       atorg.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce (PogoMetaMethodSite.java:267)
       atorg.codehaus.groovy.runtime.callsite.PogoMetaMethodSite (PogoMetaMethodSite.java:52)
       atorg.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:137)
       atorg.codehaus.groovy.tools.shell.ShellRunner (ShellRunner.groovy:57)
       atorg.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:-1)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:-2)
       atsun.reflect.NativeMethodAccessorImpl (NativeMethodAccessorImpl.java:62)
       atsun.reflect.DelegatingMethodAccessorImpl (DelegatingMethodAccessorImpl.java:43)
       atjava.lang.reflect.Method (Method.java:497)
       atorg.codehaus.groovy.reflection.CachedMethod (CachedMethod.java:90)
       atgroovy.lang.MetaMethod (MetaMethod.java:233)
       atgroovy.lang.MetaClassImpl (MetaClassImpl.java:1054)
       atorg.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:128)
       atorg.codehaus.groovy.runtime.ScriptBytecodeAdapter (ScriptBytecodeAdapter.java:148)
       atorg.codehaus.groovy.tools.shell.InteractiveShellRunner (InteractiveShellRunner.groovy:66)
       atjava_lang_Runnable$run (null:-1)
       atorg.codehaus.groovy.runtime.callsite.CallSiteArray (CallSiteArray.java:42)
       atorg.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:108)
       atorg.codehaus.groovy.runtime.callsite.AbstractCallSite (AbstractCallSite.java:112)
       atorg.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:463)
       atorg.codehaus.groovy.tools.shell.Groovysh (Groovysh.groovy:402)
       atorg.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:
       atorg.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:144)
       atorg.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:53)
       atorg.apache.sqoop.connector.jdbc.GenericJdbcFromInitializer (GenericJdbcFromInitializer.java:41)
       atorg.apache.sqoop.driver.JobManager (JobManager.java:449)
       atorg.apache.sqoop.driver.JobManager (JobManager.java:372)
       atorg.apache.sqoop.driver.JobManager (JobManager.java:276)
       atorg.apache.sqoop.handler.JobRequestHandler (JobRequestHandler.java:380)
       atorg.apache.sqoop.handler.JobRequestHandler (JobRequestHandler.java:116)
       atorg.apache.sqoop.server.v1.JobServlet (JobServlet.java:96)
       atorg.apache.sqoop.server.SqoopProtocolServlet (SqoopProtocolServlet.java:79)
       atjavax.servlet.http.HttpServlet (HttpServlet.java:646)
       atjavax.servlet.http.HttpServlet (HttpServlet.java:723)
       atorg.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:290)
       atorg.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)
       atorg.apache.hadoop.security.authentication.server.AuthenticationFilter (AuthenticationFilter.java:574)
       atorg.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter (DelegationTokenAuthenticationFilter.java:269)
       atorg.apache.hadoop.security.authentication.server.AuthenticationFilter (AuthenticationFilter.java:544)
       atorg.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:235)
       atorg.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)
       atorg.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:233)
       atorg.apache.catalina.core.StandardContextValve (StandardContextValve.java:191)
       atorg.apache.catalina.core.StandardHostValve (StandardHostValve.java:127)
       atorg.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:103)
       atorg.apache.catalina.core.StandardEngineValve (StandardEngineValve.java:109)
       atorg.apache.catalina.connector.CoyoteAdapter (CoyoteAdapter.java:293)
       atorg.apache.coyote.http11.Http11Processor (Http11Processor.java:861)
       atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler (Http11Protocol.java:606)
       atorg.apache.tomcat.util.net.JIoEndpoint$Worker (JIoEndpoint.java:489)
       atjava.lang.Thread (Thread.java:745)


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 你的方法是对的,指定列就可以了,网上的教程都是没有指定这个地方的,太坑 了,或者是我建数据库的方法泽。。。
页: [1]
查看完整版本: sqoop导mysql数据报错--求解决