Getting any exception "java.lang.NoSuchFieldError: METASTORE_CLIENT_SOCKET_LIFETIME" or "Required field" client_protocol "not set!"

I am using Structured Streaming of Spark 2.1 (which internally uses Hive 1.2.1 cubes). I am trying to develop a ForEachWriter for Hive to write streaming data to Hive via a JDBC connector.

In my cluster, I have Hive 1.1.0.

If I am using Jive jjbc jar version 1.2.1 then I get below exception due to mismatch in client and server Hive:

Required field 'client_protocol' is unset!

      

And if I am using Jive jvbc jar version 1.1.0 then I get an exception in Spark like below:

Caused by: java.lang.NoSuchFieldError: METASTORE_CLIENT_SOCKET_LIFETIME

      

Comes when initializing HiveContex

t in SparkSession

.

+3


source to share





All Articles