Repository: zeppelin
Updated Branches:
refs/heads/master 471025d1d -> b6310ada1
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()
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/b6310ada
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/b6310ada
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/b6310ada
Branch: refs/heads/master
Commit: b6310ada120ec385d7e4e4264a69a238dd87d045
Parents: 471025d
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:36 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/b6310ada/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 89d24e6..ff0f14c 100644
--- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
+++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
@@ -238,10 +238,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;
}