You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by js...@apache.org on 2017/06/27 06:38:52 UTC

[11/50] [abbrv] incubator-livy git commit: LIVY-308. Avoid enabling Hive by default in Spark2. (#287)

LIVY-308. Avoid enabling Hive by default in Spark2. (#287)

Fixed broken integration test on Spark 2.1.

Project: http://git-wip-us.apache.org/repos/asf/incubator-livy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-livy/commit/663c6130
Tree: http://git-wip-us.apache.org/repos/asf/incubator-livy/tree/663c6130
Diff: http://git-wip-us.apache.org/repos/asf/incubator-livy/diff/663c6130

Branch: refs/heads/master
Commit: 663c6130a5f576965b74e4448e68bc7b7668ad48
Parents: 807036a
Author: Saisai Shao <sa...@gmail.com>
Authored: Mon Feb 13 15:08:21 2017 +0800
Committer: Alex Man <tc...@gmail.com>
Committed: Mon Feb 13 02:08:21 2017 -0500

----------------------------------------------------------------------
 .travis.yml                                             |  2 ++
 pom.xml                                                 | 12 ++++++++++++
 .../cloudera/livy/repl/SparkContextInitializer.scala    |  2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-livy/blob/663c6130/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index b52b0bf..021c061 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,8 +5,10 @@ language: scala
 env:
   - MVN_FLAG='-Pspark-1.6 -DskipTests'
   - MVN_FLAG='-Pspark-2.0 -DskipTests'
+  - MVN_FLAG='-Pspark-2.1 -DskipTests'
   - MVN_FLAG='-Pspark-1.6 -DskipITs'
   - MVN_FLAG='-Pspark-2.0 -DskipITs'
+  - MVN_FLAG='-Pspark-2.1 -DskipITs'
 
 jdk:
   - oraclejdk7

http://git-wip-us.apache.org/repos/asf/incubator-livy/blob/663c6130/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 28db23c..8868d35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1005,6 +1005,18 @@
         <spark.version>2.0.1</spark.version>
       </properties>
     </profile>
+
+    <profile>
+      <id>spark-2.1</id>
+      <activation>
+        <property>
+          <name>spark-2.1</name>
+        </property>
+      </activation>
+      <properties>
+        <spark.version>2.1.0</spark.version>
+      </properties>
+    </profile>
   </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-livy/blob/663c6130/repl/src/main/scala/com/cloudera/livy/repl/SparkContextInitializer.scala
----------------------------------------------------------------------
diff --git a/repl/src/main/scala/com/cloudera/livy/repl/SparkContextInitializer.scala b/repl/src/main/scala/com/cloudera/livy/repl/SparkContextInitializer.scala
index 33c7f37..fd082eb 100644
--- a/repl/src/main/scala/com/cloudera/livy/repl/SparkContextInitializer.scala
+++ b/repl/src/main/scala/com/cloudera/livy/repl/SparkContextInitializer.scala
@@ -82,7 +82,7 @@ trait SparkContextInitializer extends Logging {
     builder.getClass.getMethod("config", classOf[SparkConf]).invoke(builder, conf)
 
     var spark: Object = null
-    if (conf.get("spark.sql.catalogImplementation", "hive").toLowerCase == "hive") {
+    if (conf.get("spark.sql.catalogImplementation", "in-memory").toLowerCase == "hive") {
       if (sparkClz.getMethod("hiveClassesArePresent").invoke(sparkObj).asInstanceOf[Boolean]) {
         val loader = Option(Thread.currentThread().getContextClassLoader)
           .getOrElse(getClass.getClassLoader)