Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) with Logging {
// TODO: Support for loading the jars from an already downloaded location.
logInfo(
s"Initializing HiveMetastoreConnection version $hiveMetastoreVersion using maven.")
IsolatedClientLoader.forVersion(hiveMetastoreVersion, allConfig)
IsolatedClientLoader.forVersion(
version = hiveMetastoreVersion,
config = allConfig,
barrierPrefixes = hiveMetastoreBarrierPrefixes,
sharedPrefixes = hiveMetastoreSharedPrefixes)
} else {
// Convert to files and expand any directories.
val jars =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,18 @@ private[hive] object IsolatedClientLoader {
def forVersion(
version: String,
config: Map[String, String] = Map.empty,
ivyPath: Option[String] = None): IsolatedClientLoader = synchronized {
ivyPath: Option[String] = None,
sharedPrefixes: Seq[String] = Seq.empty,
barrierPrefixes: Seq[String] = Seq.empty): IsolatedClientLoader = synchronized {
val resolvedVersion = hiveVersion(version)
val files = resolvedVersions.getOrElseUpdate(resolvedVersion,
downloadVersion(resolvedVersion, ivyPath))
new IsolatedClientLoader(hiveVersion(version), files, config)
new IsolatedClientLoader(
version = hiveVersion(version),
execJars = files,
config = config,
sharedPrefixes = sharedPrefixes,
barrierPrefixes = barrierPrefixes)
}

def hiveVersion(version: String): HiveVersion = version match {
Expand Down