exchange 执行导入命令导入mysql数据报错
spark 版本:2.4.5
mysql版本:5.6
mysql-connector-java版本:mysql-connector-java-5.1.49.jar
尝试在连接配置的数据库后面加上zeroDateTimeBehavior=convertToNull。报错“ The connection property ‘zeroDateTimeBehavior’ only accepts values of the form: ‘exception’, ‘round’ or ‘convertToNull’. The value ‘convertToNull?useUnicode=true’ is not in this set.”
21/09/28 13:03:12 INFO DAGScheduler: Job 0 failed: foreachPartition at VerticesProcessor.scala:274, took 3.169806 s
Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost, executor driver): java.sql.SQLException: Value ' 13826200823z2kaESWz+C14hM1y5De7VQ==10100086��2552552550255255255255100010000.60000000000000�0000-00-00 00:00:002019-05-21 16:17:22' can not be represented as java.sql.Timestamp
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:947)
at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:559)
at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:5913)
at com.mysql
Exception in thread "main" com.facebook.thrift.protocol.TProtocolException: The field 'code' has been assigned the invalid value -4
at com.vesoft.nebula.meta.GetSpaceResp.validate(GetSpaceResp.java:488)
at com.vesoft.nebula.meta.GetSpaceResp.read(GetSpaceResp.java:398)
at com.vesoft.nebula.meta.MetaService$getSpace_result.read(MetaService.java:10053)
at com.vesoft.nebula.meta.MetaService$Client.recv_getSpace(MetaService.java:522)
at com.vesoft.nebula.meta.MetaService$Client.getSpace(MetaService.java:492)
at com.vesoft.nebula.client.meta.MetaClient.getSpace(MetaClient.java:131)
at com.vesoft.nebula.client.meta.MetaClient.getTags(MetaClient.java:144)
at com.vesoft.nebula.exchange.MetaProvider.getLabelType(MetaProvider.scala:69)
at com.vesoft.nebula.exchange.utils.NebulaUtils$.getDataSourceFieldType(NebulaUtils.scala:32)
at com.vesoft.nebula.exchange.processor.VerticesProcessor.process(VerticesProcessor.scala:110)
at com.vesoft.nebula.exchange.Exchange$$anonfun$main$2.apply(Exchange.scala:145)
at com.vesoft.nebula.exchange.Exchange$$anonfun$main$2.apply(Exchange.scala:122)
at scala.collection.immutable.List.foreach(List.scala:392)
at com.vesoft.nebula.exchange.Exchange$.main(Exchange.scala:122)
at com.vesoft.nebula.exchange.Exchange.main(Exchange.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
java.sql.SQLException: Value ’ 13826200823z2kaESWz+C14hM1y5De7VQ==10100086��2552552550255255255255100010000.60000000000000�0000-00-00 00:00:002019-05-21 16:17:22’ can not be represented as java.sql.Timestamp
这个是数据格式不对