I have unit tests using spark local session like so:
SparkSession spark = TestHiveSparkSession.builder().master("local").enableHiveSupport().getOrCreate();
so far we were using it like:
spark.sql("select * from blabla");
However with new Hadoop version it’s no longer an option, we are to migrate to HiveWarehouseSession(Impl).
That session is usually generated as follows:
HiveWarehouseSessionImpl impl = HiveWarehouseSession.session(spark).build();
or
HiveWarehouseSessionImpl impl = HiveWarehouseBuilder.session(spark).build();
but that throws an error saying:
NoSuchElement spark.sql.hive.hiveserver2.jdbc.url
if I put that in the config then there is error saying there’s no driver for my input.
When I put the driver it can’t connect to it.
Which is rightfully so, because I have not started any hive server to connect to.
Is there a way to make it work with local session like it used to, or do I have to redesign the whole thing ?
I am trying to run sqls in unit tests the same way but from the new spark+hive wrapper solution instead of plain spark.
New version is spark-core_2.11, version 2.4.7.7.1.7.2000-305
Old version is spark-core_2.11 version 2.4.0-cdh6.3.4
hadoop went from 3.0.0-cdh6.3.4 to 3.1.1.7.1.7.2000-305