-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ZEPPELIN-1609] using pyspark(python3) with livy interperter
### What is this PR for? using pyspark(python3) with livy interperter ### What type of PR is it? Improvement ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1609 ### How should this be tested? %livy.pyspark3 3/2 check result is "1.5" ### 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: purechoc <purechoc.en@gmail.com> Author: purechoc <purechoc@ncsoft.com> Closes #1587 from purechoc/zeppelin-livy-pyspark3 and squashes the following commits: 6f7391f [purechoc] update template 7c0f70d [purechoc] refactor code 476ae25 [purechoc] Merge remote-tracking branch 'upstream3/master' into zeppelin-livy-pyspark3 55d486f [purechoc] Trigger e5db640 [purechoc] add properties 51140f2 [purechoc] Trigger 3fc98cd [purechoc] add configuration d0e2293 [purechoc] Trigger 7e42108 [purechoc] add %livy.python3 3775e47 [purechoc] add %livy.python3 c0babf6 [purechoc] add %livy.python3
- Loading branch information
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
livy/src/main/java/org/apache/zeppelin/livy/LivyPySpark3Interpreter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.zeppelin.livy; | ||
|
||
import org.apache.zeppelin.interpreter.*; | ||
import org.apache.zeppelin.interpreter.thrift.InterpreterCompletion; | ||
import org.apache.zeppelin.scheduler.Scheduler; | ||
import org.apache.zeppelin.scheduler.SchedulerFactory; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Properties; | ||
|
||
|
||
/** | ||
* Livy PySpark interpreter for Zeppelin. | ||
*/ | ||
public class LivyPySpark3Interpreter extends BaseLivyInterprereter { | ||
|
||
public LivyPySpark3Interpreter(Properties property) { | ||
super(property); | ||
} | ||
|
||
@Override | ||
public String getSessionKind() { | ||
return "pyspark3"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters