[SPARK-7489] [SPARK SHELL] Spark shell crashes when compiled with scala 2.11

Spark shell crashes when compiled with scala 2.11 and  SPARK_PREPEND_CLASSES=true

There is a similar Resolved JIRA issue -SPARK-7470 and a PR https://github.com/apache/spark/pull/5997 , which handled same issue only in scala 2.10

Author: vinodkc <vinod.kc.in@gmail.com>

Closes #6013 from vinodkc/fix_sqlcontext_exception_scala_2.11 and squashes the following commits:

119061c [vinodkc] Spark shell crashes when compiled with scala 2.11

(cherry picked from commit 4e7360e12d)
Signed-off-by: Andrew Or <andrew@databricks.com>
This commit is contained in:
vinodkc 2015-05-08 14:07:53 -07:00 committed by Andrew Or
parent 1dde3b36bb
commit 3b7fb7aaad

View file

@ -88,7 +88,7 @@ object Main extends Logging {
logInfo("Created sql context (with Hive support)..") logInfo("Created sql context (with Hive support)..")
} }
catch { catch {
case cnf: java.lang.ClassNotFoundException => case _: java.lang.ClassNotFoundException | _: java.lang.NoClassDefFoundError =>
sqlContext = new SQLContext(sparkContext) sqlContext = new SQLContext(sparkContext)
logInfo("Created sql context..") logInfo("Created sql context..")
} }