Repository: zeppelin
Updated Branches:
refs/heads/branch-0.6 115fb24fe -> ee4aa86d2
ZEPPELIN-1270. Remove getting SQLContext from SparkSession.wrapped()
### What is this PR for?
SparkSession.wrapped is only for spark 2.0 preview, it is not supported in
spark 2.0 release. So I think we can remove that piece of code. Otherwise we
will get the following error in log which might be a little confusing.
```
08:05:44,946 - Thread(pool-2-thread-3) - (Utils.java:40) -
org.apache.spark.sql.SparkSession.wrapped()
java.lang.NoSuchMethodException: org.apache.spark.sql.SparkSession.wrapped()
at java.lang.Class.getMethod(Class.java:1786)
at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:38)
at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
```
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-1270
### How should this be tested?
Check the log and the above error is gone.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Jeff Zhang <[email protected]>
Closes #1269 from zjffdu/ZEPPELIN-1270 and squashes the following commits:
a685e66 [Jeff Zhang] ZEPPELIN-1270. Remove getting SQLContext from
SparkSession.wrapped()
(cherry picked from commit b6310ada120ec385d7e4e4264a69a238dd87d045)
Signed-off-by: Lee moon soo <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/ee4aa86d
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/ee4aa86d
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/ee4aa86d
Branch: refs/heads/branch-0.6
Commit: ee4aa86d25470da7555cb898230a4bfe25506340
Parents: 115fb24
Author: Jeff Zhang <[email protected]>
Authored: Wed Aug 3 08:20:03 2016 +0800
Committer: Lee moon soo <[email protected]>
Committed: Sun Aug 7 08:54:44 2016 -0700
----------------------------------------------------------------------
.../main/java/org/apache/zeppelin/spark/SparkInterpreter.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ee4aa86d/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
----------------------------------------------------------------------
diff --git
a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
index dbe3724..2e54bf8 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -236,10 +236,7 @@ public class SparkInterpreter extends Interpreter {
*/
private SQLContext getSQLContext_2() {
if (sqlc == null) {
- sqlc = (SQLContext) Utils.invokeMethod(sparkSession, "wrapped");
- if (sqlc == null) {
- sqlc = (SQLContext) Utils.invokeMethod(sparkSession, "sqlContext");
- }
+ sqlc = (SQLContext) Utils.invokeMethod(sparkSession, "sqlContext");
}
return sqlc;
}