-
Notifications
You must be signed in to change notification settings - Fork 28.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-17088][hive] Fix 'sharesHadoopClasses' option when creating client. #20169
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
package org.apache.spark.sql.hive.client | ||
|
||
import java.io.{File, PrintStream} | ||
import java.util.Locale | ||
import java.lang.{Iterable => JIterable} | ||
import java.util.{Locale, Map => JMap} | ||
|
||
import scala.collection.JavaConverters._ | ||
import scala.collection.mutable | ||
|
@@ -82,8 +83,9 @@ import org.apache.spark.util.{CircularBuffer, Utils} | |
*/ | ||
private[hive] class HiveClientImpl( | ||
override val version: HiveVersion, | ||
warehouseDir: Option[String], | ||
sparkConf: SparkConf, | ||
hadoopConf: Configuration, | ||
hadoopConf: JIterable[JMap.Entry[String, String]], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change is needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the bug fix... explained in the PR description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any test case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test case was added in this PR! |
||
extraConfig: Map[String, String], | ||
initClassLoader: ClassLoader, | ||
val clientLoader: IsolatedClientLoader) | ||
|
@@ -130,7 +132,7 @@ private[hive] class HiveClientImpl( | |
if (ret != null) { | ||
// hive.metastore.warehouse.dir is determined in SharedState after the CliSessionState | ||
// instance constructed, we need to follow that change here. | ||
Option(hadoopConf.get(ConfVars.METASTOREWAREHOUSE.varname)).foreach { dir => | ||
warehouseDir.foreach { dir => | ||
ret.getConf.setVar(ConfVars.METASTOREWAREHOUSE, dir) | ||
} | ||
ret | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add
@param
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the semantics when
warehouseDir
is None?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the code that existed before.