Repository: spark
Updated Branches:
refs/heads/branch-1.5 4586f2188 -> 5f58704c9
[SPARK-10584] [DOC] [SQL] Documentation about spark.sql.hive.metastore.version
is wrong.
The default value of hive metastore version is 1.2.1 but the documentation says
the value of `spark.sql.hive.metastore.version` is 0.13.1.
Also, we cannot get the default value by
`sqlContext.getConf("spark.sql.hive.metastore.version")`.
Author: Kousuke Saruta <[email protected]>
Closes #8739 from sarutak/SPARK-10584.
(cherry picked from commit cf2821ef5fd9965eb6256e8e8b3f1e00c0788098)
Signed-off-by: Yin Huai <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5f58704c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5f58704c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5f58704c
Branch: refs/heads/branch-1.5
Commit: 5f58704c98c26e9399f984a3de5b74664cdad76d
Parents: 4586f21
Author: Kousuke Saruta <[email protected]>
Authored: Mon Sep 14 12:06:23 2015 -0700
Committer: Yin Huai <[email protected]>
Committed: Mon Sep 14 12:06:36 2015 -0700
----------------------------------------------------------------------
docs/sql-programming-guide.md | 2 +-
.../scala/org/apache/spark/sql/hive/HiveContext.scala | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/5f58704c/docs/sql-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index 6a1b0fb..a0b911d 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -1687,7 +1687,7 @@ The following options can be used to configure the
version of Hive that is used
<tr><th>Property Name</th><th>Default</th><th>Meaning</th></tr>
<tr>
<td><code>spark.sql.hive.metastore.version</code></td>
- <td><code>0.13.1</code></td>
+ <td><code>1.2.1</code></td>
<td>
Version of the Hive metastore. Available
options are <code>0.12.0</code> through <code>1.2.1</code>.
http://git-wip-us.apache.org/repos/asf/spark/blob/5f58704c/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
----------------------------------------------------------------------
diff --git
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
index f165bfd..83116e9 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala
@@ -111,8 +111,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc)
with Logging {
* this does not necessarily need to be the same version of Hive that is
used internally by
* Spark SQL for execution.
*/
- protected[hive] def hiveMetastoreVersion: String =
- getConf(HIVE_METASTORE_VERSION, hiveExecutionVersion)
+ protected[hive] def hiveMetastoreVersion: String =
getConf(HIVE_METASTORE_VERSION)
/**
* The location of the jars that should be used to instantiate the
HiveMetastoreClient. This
@@ -202,7 +201,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc)
with Logging {
"Builtin jars can only be used when hive execution version == hive
metastore version. " +
s"Execution: ${hiveExecutionVersion} != Metastore:
${hiveMetastoreVersion}. " +
"Specify a vaild path to the correct hive jars using
$HIVE_METASTORE_JARS " +
- s"or change $HIVE_METASTORE_VERSION to $hiveExecutionVersion.")
+ s"or change ${HIVE_METASTORE_VERSION.key} to $hiveExecutionVersion.")
}
// We recursively find all jars in the class loader chain,
@@ -606,7 +605,11 @@ private[hive] object HiveContext {
/** The version of hive used internally by Spark SQL. */
val hiveExecutionVersion: String = "1.2.1"
- val HIVE_METASTORE_VERSION: String = "spark.sql.hive.metastore.version"
+ val HIVE_METASTORE_VERSION = stringConf("spark.sql.hive.metastore.version",
+ defaultValue = Some(hiveExecutionVersion),
+ doc = "Version of the Hive metastore. Available options are " +
+ s"<code>0.12.0</code> through <code>$hiveExecutionVersion</code>.")
+
val HIVE_METASTORE_JARS = stringConf("spark.sql.hive.metastore.jars",
defaultValue = Some("builtin"),
doc = s"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]