I am using Structured Streaming of Spark 2.1 (which internally uses Hive 1.2.1 jars). I am trying to develop ForEachWriter for Hive to write streaming data to Hive through JDBC connector.
On my cluster I have Hive 1.1.0.
If I use Hive jdbc jar of version 1.2.1, then I am getting below exception because of mismatch in client & server version of Hive :
Required field 'client_protocol' is unset!
And if I use Hive jdbc jar of version 1.1.0, then I am getting exception in Spark as below :
Caused by: java.lang.NoSuchFieldError: METASTORE_CLIENT_SOCKET_LIFETIME
Its coming while initializing HiveContext in SparkSession.