【sqoop2报错】启动job报错GENERIC_JDBC_CONNECTOR_0025:No primary key - Please specify partition column

在尝试使用sqoop2启动job时遇到了GENERIC_JDBC_CONNECTOR_0025错误,提示无主键。该错误是因为导出的MySQL表缺少主键。解决方案包括在job中指定分区列(Partition column: id)或者直接在源表中添加主键。
摘要由CSDN通过智能技术生成

sqoop2启动job报错GENERIC_JDBC_CONNECTOR_0025:No primary key - Please specify partition column.

场景:
sqoop:000> start job -n job_mysql2hdfs01
Mon Sep 23 05:07:16 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Exception has occurred during processing command
Exception: org.apache.sqoop.common.SqoopException Message: GENERIC_JDBC_CONNECTOR_0025:No primary key - Please specify partition column.
Stack trace:
         at  org.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:137)  
         at  org.apache.sqoop.client.request.ResourceRequest (ResourceRequest.java:187)  
         at  org.apache.sqoop.client.request.JobResourceRequest (JobResourceRequest.java:113)  
         at  org.apache.sqoop.client.request.SqoopResourceRequests (SqoopResourceRequests.java:170)  
         at  org.apache.sqoop.client.SqoopClient (SqoopClient.java:477)  
         at  org.apache.sqoop.shell.StartJobFunction (StartJobFunction.java:64)  
         at  org.apache.sqoop.shell.SqoopFunction (SqoopFunction.java:51)  
         at  org.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:134)  
         at  org.apache.sqoop.shell.SqoopCommand (SqoopCommand.java:110)  
         at  org.codehaus.groovy.tools.shell.Command$execute (null:-1)  
         at  org.codehaus.groovy.runtime.callsite.CallSiteArray (CallSiteArray.java:45)  
         at  org.codehaus.groovy.tools.shell.Command$execute (null:-1)  
         at  org.codehaus.groovy.tools.s

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值