spark 写入 mysql 报错
报错信息如下:
"C:\Program Files\Java\jdk1.8.0_291\bin\java.exe" "-javaagent:D:\Hadoopruanjian\IDEA\IntelliJ IDEA 2021.3.2\lib\idea_rt.jar=60971:D:\Hadoopruanjian\IDEA\IntelliJ IDEA 2021.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_291\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_291\jre\lib\rt.jar;D:\bigdata\NewMarketCompetition\target\classes;C:\Users\自由生活\.ivy2\cache\org.scala-lang\scala-library\jars\scala-library-2.12.10.jar;C:\Users\自由生活\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.12.10.jar;C:\Users\自由生活\.ivy2\cache\org.scala-lang.modules\scala-xml_2.12\bundles\scala-xml_2.12-1.0.6.jar;D:\jars\xz-1.5.jar;D:\jars\jta-1.1.jar;D:\jars\jpam-1.1.jar;D:\jars\json-1.8.jar;D:\jars\re2j-1.1.jar;D:\jars\guice-4.0.jar;D:\jars\ivy-2.4.0.jar;D:\jars\oro-2.0.8.jar;D:\jars\ST4-4.0.4.jar;D:\jars\avro-1.8.2.jar;D:\jars\core-1.1.2.jar;D:\jars\gson-2.2.4.jar;D:\jars\jsp-api-2.1.jar;D:\jars\okio-1.14.0.jar;D:\jars\opencsv-2.3.jar;D:\jars\py4j-0.10.9.jar;D:\jars\shims-0.9.0.jar;D:\jars\guava-14.0.1.jar;D:\jars\jline-2.14.6.jar;D:\jars\jsr305-3.0.0.jar;D:\jars\log4j-1.2.17.jar;D:\jars\minlog-1.3.0.jar;D:\jars\okhttp-2.7.5.jar;D:\jars\stream-2.9.6.jar;D:\jars\velocity-1.5.jar;D:\jars\dnsjava-2.1.7.jar;D:\jars\ehcache-3.3.1.jar;D:\jars\generex-1.0.2.jar;D:\jars\hk2-api-2.6.1.jar;D:\jars\janino-3.0.16.jar;D:\jars\jdo-api-3.0.1.jar;D:\jars\objenesis-2.6.jar;D:\jars\paranamer-2.8.jar;D:\jars\pyrolite-4.30.jar;D:\jars\avro-ipc-1.8.2.jar;D:\jars\commons-io-2.5.jar;D:\jars\HikariCP-2.5.1.jar;D:\jars\hive-cli-2.3.7.jar;D:\jars\javax.inject-1.jar;D:\jars\json-smart-2.3.jar;D:\jars\libfb303-0.9.3.jar;D:\jars\lz4-java-1.7.1.jar;D:\jars\okhttp-3.12.12.jar;D:\jars\snakeyaml-1.24.jar;D:\jars\stax-api-1.0.1.jar;D:\jars\aopalliance-1.0.jar;D:\jars\breeze_2.12-1.0.jar;D:\jars\commons-cli-1.2.jar;D:\jars\commons-net-3.1.jar;D:\jars\derby-10.12.1.1.jar;D:\jars\hive-jdbc-2.3.7.jar;D:\jars\hk2-utils-2.6.1.jar;D:\jars\httpcore-4.4.12.jar;D:\jars\jaxb-api-2.2.11.jar;D:\jars\jersey-hk2-2.30.jar;D:\jars\jodd-core-3.5.2.jar;D:\jars\JTransforms-3.1.jar;D:\jars\kerb-core-1.0.1.jar;D:\jars\kerb-util-1.0.1.jar;D:\jars\kerby-xdr-1.0.1.jar;D:\jars\orc-core-1.5.12.jar;D:\jars\stax2-api-3.1.4.jar;D:\jars\super-csv-2.2.0.jar;D:\jars\activation-1.1.1.jar;D:\jars\automaton-1.11-8.jar;D:\jars\chill-java-0.9.5.jar;D:\jars\chill_2.12-0.9.5.jar;D:\jars\commons-dbcp-1.4.jar;D:\jars\commons-lang-2.6.jar;D:\jars\commons-text-1.6.jar;D:\jars\hive-serde-2.3.7.jar;D:\jars\hive-shims-2.3.7.jar;D:\jars\httpclient-4.5.6.jar;D:\jars\javolution-5.5.1.jar;D:\jars\JLargeArrays-1.5.jar;D:\jars\joda-time-2.10.5.jar;D:\jars\kerb-admin-1.0.1.jar;D:\jars\kerby-asn1-1.0.1.jar;D:\jars\kerby-pkix-1.0.1.jar;D:\jars\kerby-util-1.0.1.jar;D:\jars\libthrift-0.12.0.jar;D:\jars\orc-shims-1.5.12.jar;D:\jars\slf4j-api-1.7.30.jar;D:\jars\zjsonpatch-0.3.0.jar;D:\jars\zookeeper-3.4.14.jar;D:\jars\zstd-jni-1.4.8-1.jar;D:\jars\guice-servlet-4.0.jar;D:\jars\hadoop-auth-3.2.0.jar;D:\jars\hive-common-2.3.7.jar;D:\jars\hk2-locator-2.6.1.jar;D:\jars\kerb-client-1.0.1.jar;D:\jars\kerb-common-1.0.1.jar;D:\jars\kerb-crypto-1.0.1.jar;D:\jars\kerb-server-1.0.1.jar;D:\jars\kryo-shaded-4.0.2.jar;D:\jars\metrics-jmx-4.1.1.jar;D:\jars\metrics-jvm-4.1.1.jar;D:\jars\aircompressor-0.10.jar;D:\jars\arrow-format-2.0.0.jar;D:\jars\arrow-vector-2.0.0.jar;D:\jars\commons-codec-1.10.jar;D:\jars\commons-lang3-3.10.jar;D:\jars\commons-pool-1.5.4.jar;D:\jars\compress-lzf-1.0.3.jar;D:\jars\hive-beeline-2.3.7.jar;D:\jars\javax.jdo-3.2.0-m3.jar;D:\jars\jaxb-runtime-2.3.2.jar;D:\jars\jersey-client-2.30.jar;D:\jars\jersey-common-2.30.jar;D:\jars\jersey-server-2.30.jar;D:\jars\kerby-config-1.0.1.jar;D:\jars\leveldbjni-all-1.8.jar;D:\jars\metrics-core-4.1.1.jar;D:\jars\metrics-json-4.1.1.jar;D:\jars\accessors-smart-1.2.jar;D:\jars\antlr-runtime-3.5.2.jar;D:\jars\commons-math3-3.4.1.jar;D:\jars\hadoop-client-3.2.0.jar;D:\jars\hadoop-common-3.2.0.jar;D:\jars\jackson-core-2.10.0.jar;D:\jars\javassist-3.25.0-GA.jar;D:\jars\jul-to-slf4j-1.7.30.jar;D:\jars\kerb-identity-1.0.1.jar;D:\jars\protobuf-java-2.5.0.jar;D:\jars\RoaringBitmap-0.9.0.jar;D:\jars\snappy-java-1.1.8.2.jar;D:\jars\transaction-api-1.1.jar;D:\jars\woodstox-core-5.0.3.jar;D:\jars\antlr4-runtime-4.8-1.jar;D:\jars\bonecp-0.8.0.RELEASE.jar;D:\jars\commons-crypto-1.1.0.jar;D:\jars\hive-exec-2.3.7-core.jar;D:\jars\hive-metastore-2.3.7.jar;D:\jars\jakarta.inject-2.6.1.jar;D:\jars\kerb-simplekdc-1.0.1.jar;D:\jars\machinist_2.12-0.6.8.jar;D:\jars\orc-mapreduce-1.5.12.jar;D:\jars\parquet-format-2.4.0.jar;D:\jars\scala-xml_2.12-1.2.0.jar;D:\jars\shapeless_2.12-2.3.3.jar;D:\jars\slf4j-log4j12-1.7.30.jar;D:\jars\spark-sql_2.12-3.1.1.jar;D:\jars\spire_2.12-0.17.0-M1.jar;D:\jars\threeten-extra-1.5.0.jar;D:\jars\token-provider-1.0.1.jar;D:\jars\algebra_2.12-2.0.0-M2.jar;D:\jars\clickhouse-jdbc-0.3.1.jar;D:\jars\commons-compress-1.20.jar;D:\jars\commons-daemon-1.0.13.jar;D:\jars\commons-logging-1.1.3.jar;D:\jars\curator-client-2.13.0.jar;D:\jars\hadoop-yarn-api-3.2.0.jar;D:\jars\hive-shims-0.23-2.3.7.jar;D:\jars\jcl-over-slf4j-1.7.30.jar;D:\jars\parquet-column-1.10.1.jar;D:\jars\parquet-common-1.10.1.jar;D:\jars\parquet-hadoop-1.10.1.jar;D:\jars\scala-library-2.12.10.jar;D:\jars\scala-reflect-2.12.10.jar;D:\jars\spark-core_2.12-3.1.1.jar;D:\jars\spark-hive_2.12-3.1.1.jar;D:\jars\spark-repl_2.12-3.1.1.jar;D:\jars\spark-tags_2.12-3.1.1.jar;D:\jars\spark-yarn_2.12-3.1.1.jar;D:\jars\breeze-macros_2.12-1.0.jar;D:\jars\commons-httpclient-3.1.jar;D:\jars\curator-recipes-2.13.0.jar;D:\jars\flatbuffers-java-1.9.0.jar;D:\jars\hive-llap-common-2.3.7.jar;D:\jars\hive-service-rpc-3.1.2.jar;D:\jars\hive-storage-api-2.7.2.jar;D:\jars\jcip-annotations-1.0-1.jar;D:\jars\jersey-media-jaxb-2.30.jar;D:\jars\metrics-graphite-4.1.1.jar;D:\jars\netty-all-4.1.51.Final.jar;D:\jars\nimbus-jose-jwt-4.41.1.jar;D:\jars\parquet-jackson-1.10.1.jar;D:\jars\scala-compiler-2.12.10.jar;D:\jars\spark-mesos_2.12-3.1.1.jar;D:\jars\spark-mllib_2.12-3.1.1.jar;D:\jars\xbean-asm7-shaded-4.15.jar;D:\jars\arpack_combined_all-0.1.jar;D:\jars\arrow-memory-core-2.0.0.jar;D:\jars\commons-beanutils-1.9.4.jar;D:\jars\commons-compiler-3.0.16.jar;D:\jars\datanucleus-core-4.1.17.jar;D:\jars\hive-shims-common-2.3.7.jar;D:\jars\jackson-core-asl-1.9.13.jar;D:\jars\jackson-databind-2.10.0.jar;D:\jars\jakarta.ws.rs-api-2.1.6.jar;D:\jars\macro-compat_2.12-1.1.1.jar;D:\jars\parquet-encoding-1.10.1.jar;D:\jars\spark-graphx_2.12-3.1.1.jar;D:\jars\spark-sketch_2.12-3.1.1.jar;D:\jars\spark-unsafe_2.12-3.1.1.jar;D:\jars\univocity-parsers-2.9.1.jar;D:\jars\arrow-memory-netty-2.0.0.jar;D:\jars\curator-framework-2.13.0.jar;D:\jars\datanucleus-rdbms-4.1.19.jar;D:\jars\hadoop-annotations-3.2.0.jar;D:\jars\hadoop-hdfs-client-3.2.0.jar;D:\jars\hadoop-yarn-client-3.2.0.jar;D:\jars\hadoop-yarn-common-3.2.0.jar;D:\jars\jackson-jaxrs-base-2.9.5.jar;D:\jars\json4s-ast_2.12-3.7.0-M5.jar;D:\jars\kubernetes-client-4.12.0.jar;D:\jars\spark-kvstore_2.12-3.1.1.jar;D:\jars\avro-mapred-1.8.2-hadoop2.jar;D:\jars\cats-kernel_2.12-2.0.0-M4.jar;D:\jars\commons-collections-3.2.2.jar;D:\jars\datanucleus-api-jdo-4.2.4.jar;D:\jars\jackson-mapper-asl-1.9.13.jar;D:\jars\jakarta.servlet-api-4.0.3.jar;D:\jars\json4s-core_2.12-3.7.0-M5.jar;D:\jars\spark-catalyst_2.12-3.1.1.jar;D:\jars\spark-launcher_2.12-3.1.1.jar;D:\jars\spire-util_2.12-0.17.0-M1.jar;D:\jars\audience-annotations-0.5.0.jar;D:\jars\hadoop-yarn-registry-3.2.0.jar;D:\jars\hive-shims-scheduler-2.3.7.jar;D:\jars\hive-vector-code-gen-2.3.7.jar;D:\jars\jackson-annotations-2.10.0.jar;D:\jars\jakarta.xml.bind-api-2.3.2.jar;D:\jars\spark-streaming_2.12-3.1.1.jar;D:\jars\json4s-scalap_2.12-3.7.0-M5.jar;D:\jars\logging-interceptor-3.12.12.jar;D:\jars\mesos-1.4.0-shaded-protobuf.jar;D:\jars\mysql-connector-java-5.1.38.jar;D:\jars\osgi-resource-locator-1.0.3.jar;D:\jars\spark-kubernetes_2.12-3.1.1.jar;D:\jars\spark-tags_2.12-3.1.1-tests.jar;D:\jars\spire-macros_2.12-0.17.0-M1.jar;D:\jars\aopalliance-repackaged-2.6.1.jar;D:\jars\commons-configuration2-2.1.1.jar;D:\jars\istack-commons-runtime-3.0.8.jar;D:\jars\jakarta.activation-api-1.2.1.jar;D:\jars\jakarta.annotation-api-1.3.5.jar;D:\jars\jakarta.validation-api-2.0.2.jar;D:\jars\json4s-jackson_2.12-3.7.0-M5.jar;D:\jars\kubernetes-model-apps-4.12.0.jar;D:\jars\kubernetes-model-core-4.12.0.jar;D:\jars\kubernetes-model-rbac-4.12.0.jar;D:\jars\spark-mllib-local_2.12-3.1.1.jar;D:\jars\htrace-core4-4.1.0-incubating.jar;D:\jars\jersey-container-servlet-2.30.jar;D:\jars\kubernetes-model-batch-4.12.0.jar;D:\jars\spire-platform_2.12-0.17.0-M1.jar;D:\jars\jackson-dataformat-yaml-2.10.0.jar;D:\jars\jackson-datatype-jsr310-2.11.2.jar;D:\jars\kubernetes-model-common-4.12.0.jar;D:\jars\kubernetes-model-events-4.12.0.jar;D:\jars\kubernetes-model-policy-4.12.0.jar;D:\jars\hadoop-yarn-server-common-3.2.0.jar;D:\jars\jackson-module-paranamer-2.10.0.jar;D:\jars\kubernetes-model-metrics-4.12.0.jar;D:\jars\spark-network-common_2.12-3.1.1.jar;D:\jars\hudi-spark3.1-bundle_2.12-0.12.0.jar;D:\jars\jackson-module-scala_2.12-2.10.0.jar;D:\jars\kubernetes-model-settings-4.12.0.jar;D:\jars\spark-network-shuffle_2.12-3.1.1.jar;D:\jars\hudi-utilities-bundle_2.12-0.12.0.jar;D:\jars\jackson-jaxrs-json-provider-2.9.5.jar;D:\jars\kubernetes-model-discovery-4.12.0.jar;D:\jars\hadoop-mapreduce-client-core-3.2.0.jar;D:\jars\hadoop-yarn-server-web-proxy-3.2.0.jar;D:\jars\jersey-container-servlet-core-2.30.jar;D:\jars\kubernetes-model-extensions-4.12.0.jar;D:\jars\kubernetes-model-networking-4.12.0.jar;D:\jars\kubernetes-model-scheduling-4.12.0.jar;D:\jars\scala-collection-compat_2.12-2.1.1.jar;D:\jars\spark-hive-thriftserver_2.12-3.1.1.jar;D:\jars\kubernetes-model-autoscaling-4.12.0.jar;D:\jars\scala-parser-combinators_2.12-1.1.2.jar;D:\jars\geronimo-jcache_1.0_spec-1.0-alpha-1.jar;D:\jars\hadoop-mapreduce-client-common-3.2.0.jar;D:\jars\kubernetes-model-certificates-4.12.0.jar;D:\jars\kubernetes-model-coordination-4.12.0.jar;D:\jars\kubernetes-model-storageclass-4.12.0.jar;D:\jars\kubernetes-model-apiextensions-4.12.0.jar;D:\jars\jackson-module-jaxb-annotations-2.10.0.jar;D:\jars\hadoop-mapreduce-client-jobclient-3.2.0.jar;D:\jars\kubernetes-model-admissionregistration-4.12.0.jar;D:\jars\dropwizard-metrics-hadoop-metrics2-reporter-0.1.2.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-client\2.2.3\hbase-client-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\thirdparty\hbase-shaded-protobuf\2.2.1\hbase-shaded-protobuf-2.2.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-hadoop-compat\2.2.3\hbase-hadoop-compat-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-hadoop2-compat\2.2.3\hbase-hadoop2-compat-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-protocol-shaded\2.2.3\hbase-protocol-shaded-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;D:\Hadoopruanjian\mavenwenjian\commons-io\commons-io\2.5\commons-io-2.5.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\commons\commons-lang3\3.6\commons-lang3-3.6.jar;D:\Hadoopruanjian\mavenwenjian\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\thirdparty\hbase-shaded-miscellaneous\2.2.1\hbase-shaded-miscellaneous-2.2.1.jar;D:\Hadoopruanjian\mavenwenjian\com\google\errorprone\error_prone_annotations\2.3.3\error_prone_annotations-2.3.3.jar;D:\Hadoopruanjian\mavenwenjian\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\thirdparty\hbase-shaded-netty\2.2.1\hbase-shaded-netty-2.2.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\zookeeper\zookeeper\3.4.10\zookeeper-3.4.10.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\htrace\htrace-core4\4.2.0-incubating\htrace-core4-4.2.0-incubating.jar;D:\Hadoopruanjian\mavenwenjian\org\jruby\jcodings\jcodings\1.0.18\jcodings-1.0.18.jar;D:\Hadoopruanjian\mavenwenjian\org\jruby\joni\joni\2.1.11\joni-2.1.11.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\commons\commons-crypto\1.0.0\commons-crypto-1.0.0.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-auth\2.8.5\hadoop-auth-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\com\nimbusds\nimbus-jose-jwt\4.41.1\nimbus-jose-jwt-4.41.1.jar;D:\Hadoopruanjian\mavenwenjian\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\curator\curator-framework\2.7.1\curator-framework-2.7.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\yetus\audience-annotations\0.5.0\audience-annotations-0.5.0.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-common\2.2.3\hbase-common-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\com\github\stephenc\findbugs\findbugs-annotations\1.3.9-1\findbugs-annotations-1.3.9-1.jar;D:\Hadoopruanjian\mavenwenjian\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-server\2.2.3\hbase-server-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-http\2.2.3\hbase-http-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-util-ajax\9.3.27.v20190418\jetty-util-ajax-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-http\9.3.27.v20190418\jetty-http-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-security\9.3.27.v20190418\jetty-security-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\core\jersey-server\2.25.1\jersey-server-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\core\jersey-common\2.25.1\jersey-common-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\bundles\repackaged\jersey-guava\2.25.1\jersey-guava-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\core\jersey-client\2.25.1\jersey-client-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\media\jersey-media-jaxb\2.25.1\jersey-media-jaxb-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\hk2-api\2.5.0-b32\hk2-api-2.5.0-b32.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\hk2-utils\2.5.0-b32\hk2-utils-2.5.0-b32.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\external\aopalliance-repackaged\2.5.0-b32\aopalliance-repackaged-2.5.0-b32.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\external\javax.inject\2.5.0-b32\javax.inject-2.5.0-b32.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\hk2\hk2-locator\2.5.0-b32\hk2-locator-2.5.0-b32.jar;D:\Hadoopruanjian\mavenwenjian\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar;D:\Hadoopruanjian\mavenwenjian\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\jersey\containers\jersey-container-servlet-core\2.25.1\jersey-container-servlet-core-2.25.1.jar;D:\Hadoopruanjian\mavenwenjian\javax\ws\rs\javax.ws.rs-api\2.0.1\javax.ws.rs-api-2.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-procedure\2.2.3\hbase-procedure-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-zookeeper\2.2.3\hbase-zookeeper-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-replication\2.2.3\hbase-replication-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-metrics-api\2.2.3\hbase-metrics-api-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-metrics\2.2.3\hbase-metrics-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-server\9.3.27.v20190418\jetty-server-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-io\9.3.27.v20190418\jetty-io-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-servlet\9.3.27.v20190418\jetty-servlet-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-webapp\9.3.27.v20190418\jetty-webapp-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-xml\9.3.27.v20190418\jetty-xml-9.3.27.v20190418.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\web\javax.servlet.jsp\2.3.2\javax.servlet.jsp-2.3.2.jar;D:\Hadoopruanjian\mavenwenjian\org\glassfish\javax.el\3.0.1-b12\javax.el-3.0.1-b12.jar;D:\Hadoopruanjian\mavenwenjian\javax\servlet\jsp\javax.servlet.jsp-api\2.3.1\javax.servlet.jsp-api-2.3.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;D:\Hadoopruanjian\mavenwenjian\org\jamon\jamon-runtime\2.4.1\jamon-runtime-2.4.1.jar;D:\Hadoopruanjian\mavenwenjian\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;D:\Hadoopruanjian\mavenwenjian\com\lmax\disruptor\3.3.6\disruptor-3.3.6.jar;D:\Hadoopruanjian\mavenwenjian\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-distcp\2.8.5\hadoop-distcp-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-annotations\2.8.5\hadoop-annotations-2.8.5.jar;C:\Program Files\Java\jdk1.8.0_291\lib\tools.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-mapreduce-client-core\2.8.5\hadoop-mapreduce-client-core-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-yarn-common\2.8.5\hadoop-yarn-common-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-yarn-api\2.8.5\hadoop-yarn-api-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;D:\Hadoopruanjian\mavenwenjian\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;D:\Hadoopruanjian\mavenwenjian\javax\activation\activation\1.1\activation-1.1.jar;D:\Hadoopruanjian\mavenwenjian\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;D:\Hadoopruanjian\mavenwenjian\com\google\inject\guice\3.0\guice-3.0.jar;D:\Hadoopruanjian\mavenwenjian\javax\inject\javax.inject\1\javax.inject-1.jar;D:\Hadoopruanjian\mavenwenjian\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\contribs\jersey-guice\1.9\jersey-guice-1.9.jar;D:\Hadoopruanjian\mavenwenjian\com\google\inject\extensions\guice-servlet\3.0\guice-servlet-3.0.jar;D:\Hadoopruanjian\mavenwenjian\io\netty\netty\3.6.2.Final\netty-3.6.2.Final.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-hdfs\2.8.5\hadoop-hdfs-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-hdfs-client\2.8.5\hadoop-hdfs-client-2.8.5.jar;D:\Hadoopruanjian\mavenwenjian\com\squareup\okhttp\okhttp\2.4.0\okhttp-2.4.0.jar;D:\Hadoopruanjian\mavenwenjian\com\squareup\okio\okio\1.4.0\okio-1.4.0.jar;D:\Hadoopruanjian\mavenwenjian\org\mortbay\jetty\jetty\6.1.26\jetty-6.1.26.jar;D:\Hadoopruanjian\mavenwenjian\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;D:\Hadoopruanjian\mavenwenjian\commons-daemon\commons-daemon\1.0.13\commons-daemon-1.0.13.jar;D:\Hadoopruanjian\mavenwenjian\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;D:\Hadoopruanjian\mavenwenjian\io\netty\netty-all\4.0.23.Final\netty-all-4.0.23.Final.jar;D:\Hadoopruanjian\mavenwenjian\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hadoop\hadoop-common\3.1.3\hadoop-common-3.1.3.jar;D:\Hadoopruanjian\mavenwenjian\com\google\guava\guava\27.0-jre\guava-27.0-jre.jar;D:\Hadoopruanjian\mavenwenjian\com\google\guava\failureaccess\1.0\failureaccess-1.0.jar;D:\Hadoopruanjian\mavenwenjian\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;D:\Hadoopruanjian\mavenwenjian\org\checkerframework\checker-qual\2.5.2\checker-qual-2.5.2.jar;D:\Hadoopruanjian\mavenwenjian\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\mojo\animal-sniffer-annotations\1.17\animal-sniffer-annotations-1.17.jar;D:\Hadoopruanjian\mavenwenjian\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\httpcomponents\httpclient\4.5.2\httpclient-4.5.2.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\httpcomponents\httpcore\4.4.4\httpcore-4.4.4.jar;D:\Hadoopruanjian\mavenwenjian\commons-net\commons-net\3.6\commons-net-3.6.jar;D:\Hadoopruanjian\mavenwenjian\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\Hadoopruanjian\mavenwenjian\org\eclipse\jetty\jetty-util\9.3.24.v20180605\jetty-util-9.3.24.v20180605.jar;D:\Hadoopruanjian\mavenwenjian\javax\servlet\jsp\jsp-api\2.1\jsp-api-2.1.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\jersey-core\1.19\jersey-core-1.19.jar;D:\Hadoopruanjian\mavenwenjian\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\jersey-servlet\1.19\jersey-servlet-1.19.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\jersey-json\1.19\jersey-json-1.19.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\xml\bind\jaxb-impl\2.2.3-1\jaxb-impl-2.2.3-1.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\jackson\jackson-core-asl\1.9.2\jackson-core-asl-1.9.2.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\jackson\jackson-mapper-asl\1.9.2\jackson-mapper-asl-1.9.2.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\jackson\jackson-jaxrs\1.9.2\jackson-jaxrs-1.9.2.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\jackson\jackson-xc\1.9.2\jackson-xc-1.9.2.jar;D:\Hadoopruanjian\mavenwenjian\com\sun\jersey\jersey-server\1.19\jersey-server-1.19.jar;D:\Hadoopruanjian\mavenwenjian\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\Hadoopruanjian\mavenwenjian\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\commons\commons-configuration2\2.1.1\commons-configuration2-2.1.1.jar;D:\Hadoopruanjian\mavenwenjian\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\avro\avro\1.7.7\avro-1.7.7.jar;D:\Hadoopruanjian\mavenwenjian\com\thoughtworks\paranamer\paranamer\2.3\paranamer-2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\xerial\snappy\snappy-java\1.0.5\snappy-java-1.0.5.jar;D:\Hadoopruanjian\mavenwenjian\com\google\re2j\re2j\1.1\re2j-1.1.jar;D:\Hadoopruanjian\mavenwenjian\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;D:\Hadoopruanjian\mavenwenjian\com\jcraft\jsch\0.1.54\jsch-0.1.54.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\curator\curator-client\2.13.0\curator-client-2.13.0.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\curator\curator-recipes\2.13.0\curator-recipes-2.13.0.jar;D:\Hadoopruanjian\mavenwenjian\com\google\code\findbugs\jsr305\3.0.0\jsr305-3.0.0.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\commons\commons-compress\1.18\commons-compress-1.18.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-simplekdc\1.0.1\kerb-simplekdc-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-client\1.0.1\kerb-client-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerby-config\1.0.1\kerby-config-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-core\1.0.1\kerb-core-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerby-pkix\1.0.1\kerby-pkix-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerby-asn1\1.0.1\kerby-asn1-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerby-util\1.0.1\kerby-util-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-common\1.0.1\kerb-common-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-crypto\1.0.1\kerb-crypto-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-util\1.0.1\kerb-util-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\token-provider\1.0.1\token-provider-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-admin\1.0.1\kerb-admin-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-server\1.0.1\kerb-server-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerb-identity\1.0.1\kerb-identity-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\kerby\kerby-xdr\1.0.1\kerby-xdr-1.0.1.jar;D:\Hadoopruanjian\mavenwenjian\com\fasterxml\jackson\core\jackson-databind\2.7.8\jackson-databind-2.7.8.jar;D:\Hadoopruanjian\mavenwenjian\com\fasterxml\jackson\core\jackson-annotations\2.7.0\jackson-annotations-2.7.0.jar;D:\Hadoopruanjian\mavenwenjian\com\fasterxml\jackson\core\jackson-core\2.7.8\jackson-core-2.7.8.jar;D:\Hadoopruanjian\mavenwenjian\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;D:\Hadoopruanjian\mavenwenjian\com\fasterxml\woodstox\woodstox-core\5.0.3\woodstox-core-5.0.3.jar;D:\Hadoopruanjian\mavenwenjian\io\dropwizard\metrics\metrics-core\3.2.6\metrics-core-3.2.6.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-protocol\2.2.3\hbase-protocol-2.2.3.jar;D:\Hadoopruanjian\mavenwenjian\org\apache\hbase\hbase-mapreduce\2.2.3\hbase-mapreduce-2.2.3.jar" environment
==============================================mysql环境初始化中=====================================================
table7 ? ? ? ? 进入MySQL中 ? ………………………………………………
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/jars/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Hadoopruanjian/mavenwenjian/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
0 ? ?[main] INFO ?ru.yandex.clickhouse.ClickHouseDriver ?- Driver registered
5881 [Executor task launch worker for task 0.0 in stage 0.0 (TID 0)] ERROR org.apache.spark.executor.Executor ?- Exception in task 0.0 in stage 0.0 (TID 0)
java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
?? ?at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
?? ?at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
?? ?at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
?? ?at com.mysql.jdbc.Util.getInstance(Util.java:387)
?? ?at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1154)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
?? ?at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:687)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1(JdbcUtils.scala:856)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1$adapted(JdbcUtils.scala:854)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2(RDD.scala:1020)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2$adapted(RDD.scala:1020)
?? ?at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2242)
?? ?at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
?? ?at org.apache.spark.scheduler.Task.run(Task.scala:131)
?? ?at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
?? ?at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
?? ?at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
?? ?at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
?? ?at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
?? ?at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3876)
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
?? ?at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
?? ?at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
?? ?at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
?? ?at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
?? ?at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
?? ?... 16 more
5928 [task-result-getter-0] ERROR org.apache.spark.scheduler.TaskSetManager ?- Task 0 in stage 0.0 failed 1 times; aborting job
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) (192.168.248.1 executor driver): java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
?? ?at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
?? ?at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
?? ?at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
?? ?at com.mysql.jdbc.Util.getInstance(Util.java:387)
?? ?at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1154)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
?? ?at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:687)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1(JdbcUtils.scala:856)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1$adapted(JdbcUtils.scala:854)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2(RDD.scala:1020)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2$adapted(RDD.scala:1020)
?? ?at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2242)
?? ?at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
?? ?at org.apache.spark.scheduler.Task.run(Task.scala:131)
?? ?at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
?? ?at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
?? ?at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
?? ?at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
?? ?at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
?? ?at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3876)
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
?? ?at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
?? ?at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
?? ?at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
?? ?at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
?? ?at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
?? ?... 16 more
Driver stacktrace:
?? ?at org.apache.spark.scheduler.DAGScheduler.failJobAndIndependentStages(DAGScheduler.scala:2253)
?? ?at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2(DAGScheduler.scala:2202)
?? ?at org.apache.spark.scheduler.DAGScheduler.$anonfun$abortStage$2$adapted(DAGScheduler.scala:2201)
?? ?at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
?? ?at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
?? ?at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
?? ?at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:2201)
?? ?at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1(DAGScheduler.scala:1078)
?? ?at org.apache.spark.scheduler.DAGScheduler.$anonfun$handleTaskSetFailed$1$adapted(DAGScheduler.scala:1078)
?? ?at scala.Option.foreach(Option.scala:407)
?? ?at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:1078)
?? ?at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2440)
?? ?at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2382)
?? ?at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2371)
?? ?at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
?? ?at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:868)
?? ?at org.apache.spark.SparkContext.runJob(SparkContext.scala:2202)
?? ?at org.apache.spark.SparkContext.runJob(SparkContext.scala:2223)
?? ?at org.apache.spark.SparkContext.runJob(SparkContext.scala:2242)
?? ?at org.apache.spark.SparkContext.runJob(SparkContext.scala:2267)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$1(RDD.scala:1020)
?? ?at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
?? ?at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
?? ?at org.apache.spark.rdd.RDD.withScope(RDD.scala:414)
?? ?at org.apache.spark.rdd.RDD.foreachPartition(RDD.scala:1018)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.saveTable(JdbcUtils.scala:854)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:82)
?? ?at org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:46)
?? ?at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
?? ?at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
?? ?at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:90)
?? ?at org.apache.spark.sql.execution.SparkPlan.$anonfun$execute$1(SparkPlan.scala:180)
?? ?at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:218)
?? ?at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
?? ?at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:215)
?? ?at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:176)
?? ?at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:132)
?? ?at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:131)
?? ?at org.apache.spark.sql.DataFrameWriter.$anonfun$runCommand$1(DataFrameWriter.scala:989)
?? ?at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$5(SQLExecution.scala:103)
?? ?at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:163)
?? ?at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:90)
?? ?at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:772)
?? ?at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:64)
?? ?at org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:989)
?? ?at org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:438)
?? ?at org.apache.spark.sql.DataFrameWriter.saveInternal(DataFrameWriter.scala:415)
?? ?at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:301)
?? ?at org.apache.spark.sql.DataFrameWriter.jdbc(DataFrameWriter.scala:817)
?? ?at until.writeMysql(until.scala:40)
?? ?at environment$.writeMysqlTable(environment.scala:19)
?? ?at environment$.Mysql(environment.scala:110)
?? ?at environment$.main(environment.scala:149)
?? ?at environment.main(environment.scala)
Caused by: java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
?? ?at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
?? ?at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
?? ?at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
?? ?at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
?? ?at com.mysql.jdbc.Util.getInstance(Util.java:387)
?? ?at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1154)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
?? ?at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:687)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1(JdbcUtils.scala:856)
?? ?at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$saveTable$1$adapted(JdbcUtils.scala:854)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2(RDD.scala:1020)
?? ?at org.apache.spark.rdd.RDD.$anonfun$foreachPartition$2$adapted(RDD.scala:1020)
?? ?at org.apache.spark.SparkContext.$anonfun$runJob$5(SparkContext.scala:2242)
?? ?at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
?? ?at org.apache.spark.scheduler.Task.run(Task.scala:131)
?? ?at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:497)
?? ?at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1439)
?? ?at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:500)
?? ?at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
?? ?at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
?? ?at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3876)
?? ?at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
?? ?at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
?? ?at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
?? ?at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
?? ?at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
?? ?at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
?? ?at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
?? ?... 16 more
Process finished with exit code 1
?
解决办法如下:
由于错误信息显示?Data truncation: Incorrect datetime value: '1912-04-18 00:00:00' for column 'birthday' at row 1
,这通常意味着值?'1912-04-18 00:00:00'
?不被 MySQL 的?TIMESTAMP
?类型支持。
MySQL 的?TIMESTAMP
?类型有一定的日期范围限制。它表达的时间范围大约是?1970-01-01 00:00:01 UTC
?到?2038-01-19 03:14:07 UTC
。如果你尝试将一个不在此范围内的时间戳存储到?TIMESTAMP
?类型的列中,就会发生数据截断错误。
在你的案例中,由于?'1912-04-18'
?这个日期时间值低于?TIMESTAMP
?类型的下限,MySQL 就会报错。要解决这个问题,你有几个选项:
-
使用?
DATETIME
?类型代替?TIMESTAMP
?类型。- MySQL 的?
DATETIME
?类型可以存储的范围是?1000-01-01 00:00:00
?到?9999-12-31 23:59:59
,所以更适合存储更宽的时间范围。 - 修改你的表结构,将?
birthday
?列的类型从?TIMESTAMP
?改为?DATETIME
,然后再尝试写入数据。
- MySQL 的?
-
如果你不希望或不能更改数据库结构,那么你需要对你的数据应用某种业务逻辑,以确保所有日期时间值都位于?
TIMESTAMP
?的有效范围内。可能的做法是将不在范围内的日期时间设置为一个默认值,例如?1970-01-01 00:00:01
,或者在写入前从数据集中过滤掉这些值。
要修改表的列类型,你可以使用如下的 SQL 语句执行结构调整:
ALTER TABLE your_table_name
CHANGE COLUMN birthday birthday DATETIME NOT NULL;
务必备份相关数据以防意外丢失。如果你需要在写入之前清洗数据,你可以在 Spark DataFrame 中如下操作:
import org.apache.spark.sql.functions._
import spark.implicits._
// 假设你的DataFrame是df
val processedDF = df.withColumn("birthday",
when($"birthday" < to_timestamp(lit("1970-01-01 00:00:01")), to_timestamp(lit("1970-01-01 00:00:01")))
.otherwise($"birthday")
)
// 然后将processedDF写入数据库
在写入数据之后,确保你的 MySQL 连接配置和 Spark 配置项正确无误。
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!