Open mikitakandratsiuk opened 4 years ago
@mikitakandratsiuk were you able to find any solution for this?
@mavericksid, it's been a long time since I've raised this issue, so I don't really remember. Here is the comment that I found in my code, hope it helps:
I've excluded complete
org.spark-project.hive
from Holdenkarau and substituted it withorg.apache.hive:hive-exec:3.1.2
andorg.apache.hive:hive-metastore:3.1.2
.build.sbt -
libraryDependencies
:"com.holdenkarau" %% "spark-testing-base" % s"${sparkVersion}_0.14.0" % Test // exclude Hive (especially Hive Shims) because of "IllegalArgumentException: Unrecognized Hadoop major version number: 3.2.1" error (add real Hive dependency below instead) // the reason is that Hive dependency is added by Spark-Hive 2.4.5, where Hive doesn't support Hadoop 3 excludeAll ExclusionRule("org.spark-project.hive") "org.apache.hive" % "hive-metastore" % "3.1.2" % Test, "org.apache.hive" % "hive-exec" % "3.1.2" % Test,
Using version 2.4.5_0.14.0 There is an issue during creation of Spark Session object. As can be seen here, Spark Session has enableHiveSupport by default. This calls the
org.spark-project.hive:hive-exec:1.2.1.spark2
library (specifically Hive Shims) which is not compatible with Hadoop 3 and causes "Unrecognized Hadoop major version number" error.This makes spark-testing-base unusable with Hadoop 3 (especially when Hive is not required for the project at all).
The stack trace is below: