scala> var dataset = spark.sql("select 1,'a'")
dataset: org.apache.spark.sql.DataFrame = [1: int, a: string]
scala> spark.sql("select * from test").show
2019-09-18 16:20:59 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:20:59 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:20:59 WARN KVErrorHandler:222 - Stale Epoch encountered for region [{Region[2] ConfVer[1] Version[21] Store[1] KeyRange[t200\000\000\000\000\000\000+]:[]}]
2019-09-18 16:20:59 WARN KVErrorHandler:120 - Failed to send notification back to driver since CacheInvalidateCallBack is null in executor node.
2019-09-18 16:20:59 WARN RegionStoreClient:464 - Re-splitting region task due to region error:EpochNotMatch current epoch of region 2 is conf_ver: 1 version: 22, but you sent conf_ver: 1 version: 21
+---+---+
| 1| a|
+---+---+
| 1| a|
+---+---+
scala>
scala>
scala>
scala> var dataset = spark.sql("select 2,'b'")
dataset: org.apache.spark.sql.DataFrame = [2: int, b: string]
scala> dataset.write.mode(saveMode = "overwrite").format("jdbc").option("driver", "com.mysql.jdbc.Driver").option("url", "jdbc:mysql://192.168.10.111:4000/test?&autoReconnect=true&failOverReadOnly=false").option("useSSL", "false").option("dbtable", "test").option("isolationLevel", "NONE").option("user", "root").option("password", "hydee@123").save()
scala> spark.sql("select * from test").show
2019-09-18 16:21:31 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:21:31 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:21:32 WARN KVErrorHandler:222 - Stale Epoch encountered for region [{Region[2] ConfVer[1] Version[22] Store[1] KeyRange[t200\000\000\000\000\000\000.]:[]}]
2019-09-18 16:21:32 WARN KVErrorHandler:120 - Failed to send notification back to driver since CacheInvalidateCallBack is null in executor node.
2019-09-18 16:21:32 WARN RegionStoreClient:464 - Re-splitting region task due to region error:EpochNotMatch current epoch of region 2 is conf_ver: 1 version: 23, but you sent conf_ver: 1 version: 22
+---+---+
| 2| b|
+---+---+
| 2| b|
+---+---+
scala> spark.sql("select * from test").show
2019-09-18 16:23:22 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:23:22 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
+---+---+
| 2| b|
+---+---+
| 2| b|
+---+---+
scala> var dataset = spark.sql("select 1,'a'")
dataset: org.apache.spark.sql.DataFrame = [1: int, a: string]
scala> dataset.write.mode(saveMode = "overwrite").format("jdbc").option("driver", "com.mysql.jdbc.Driver").option("url", "jdbc:mysql://192.168.10.111:4000/test?&autoReconnect=true&failOverReadOnly=false").option("useSSL", "false").option("dbtable", "test").option("isolationLevel", "NONE").option("user", "root").option("password", "hydee@123").save()
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
scala> spark.sql("select * from test").show
2019-09-18 16:23:47 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:23:47 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:23:47 WARN KVErrorHandler:193 - Stale Epoch encountered for region [{Region[2] ConfVer[1] Version[23] Store[1] KeyRange[t200\000\000\000\000\000\0001]:[]}]
2019-09-18 16:23:47 WARN KVErrorHandler:104 - Failed to send notification back to driver since CacheInvalidateCallBack is null in executor node.
2019-09-18 16:23:47 WARN RegionStoreClient:564 - Re-splitting region task due to region error:EpochNotMatch current epoch of region 2 is conf_ver: 1 version: 24, but you sent conf_ver: 1 version: 23
+---+---+
| 2| b|
+---+---+
| 2| b|
+---+---+
scala> spark.sql("select * from test").show
2019-09-18 16:25:48 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:25:48 WARN ObjectStore:568 - Failed to get database test, returning NoSuchObjectException
2019-09-18 16:25:49 WARN KVErrorHandler:193 - Stale Epoch encountered for region [{Region[2] ConfVer[1] Version[23] Store[1] KeyRange[t200\000\000\000\000\000\0001]:[]}]
2019-09-18 16:25:49 WARN KVErrorHandler:104 - Failed to send notification back to driver since CacheInvalidateCallBack is null in executor node.
2019-09-18 16:25:49 WARN RegionStoreClient:564 - Re-splitting region task due to region error:EpochNotMatch current epoch of region 2 is conf_ver: 1 version: 24, but you sent conf_ver: 1 version: 23
+---+---+
| 1| a|
+---+---+
| 1| a|
+---+---+
16-09-2019 18:19:50 CST StructuredStream INFO - 2019-09-16 18:19:50 WARN TaskSetManager:66 - Lost task 0.0 in stage 0.0 (TID 0, 192.168.10.204, executor 2): java.io.InvalidClassException: org.apache.spark.sql.tispark.TiRDD; local class incompatible: stream classdesc serialVersionUID = -6650751149050193034, local class serialVersionUID = 1833683067262546845
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:616)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at scala.collection.immutable.List$SerializationProxy.readObject(List.scala:479)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.reflect.Method.invoke(Method.java:498)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at scala.collection.immutable.List$SerializationProxy.readObject(List.scala:479)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.reflect.Method.invoke(Method.java:498)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at scala.collection.immutable.List$SerializationProxy.readObject(List.scala:479)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.reflect.Method.invoke(Method.java:498)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at scala.collection.immutable.List$SerializationProxy.readObject(List.scala:479)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.reflect.Method.invoke(Method.java:498)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at scala.collection.immutable.List$SerializationProxy.readObject(List.scala:479)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16-09-2019 18:19:50 CST StructuredStream INFO - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.reflect.Method.invoke(Method.java:498)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1909)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
16-09-2019 18:19:50 CST StructuredStream INFO - at org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:75)
16-09-2019 18:19:50 CST StructuredStream INFO - at org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:114)
16-09-2019 18:19:50 CST StructuredStream INFO - at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:80)
16-09-2019 18:19:50 CST StructuredStream INFO - at org.apache.spark.scheduler.Task.run(Task.scala:109)
16-09-2019 18:19:50 CST StructuredStream INFO - at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:345)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
16-09-2019 18:19:50 CST StructuredStream INFO - at java.lang.Thread.run(Thread.java:745)
16-09-2019 18:19:50 CST StructuredStream INFO -