Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,16 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.ConcurrentHashMap;



/**
* Base class for livy interpreters.
*/
public abstract class BaseLivyInterprereter extends Interpreter {
public abstract class BaseLivyInterpreter extends Interpreter {

protected static final Logger LOGGER = LoggerFactory.getLogger(BaseLivyInterprereter.class);
protected static final Logger LOGGER = LoggerFactory.getLogger(BaseLivyInterpreter.class);
private static Gson gson = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
private static String SESSION_NOT_FOUND_PATTERN = "\"Session '\\d+' not found.\"";

Expand All @@ -68,7 +67,6 @@ public abstract class BaseLivyInterprereter extends Interpreter {
private int sessionCreationTimeout;
private int pullStatusInterval;
protected boolean displayAppInfo;
private AtomicBoolean sessionExpired = new AtomicBoolean(false);
protected LivyVersion livyVersion;
private RestTemplate restTemplate;

Expand All @@ -77,7 +75,7 @@ public abstract class BaseLivyInterprereter extends Interpreter {
private ConcurrentHashMap<String, Integer> paragraphId2StmtProgressMap =
new ConcurrentHashMap<>();

public BaseLivyInterprereter(Properties property) {
public BaseLivyInterpreter(Properties property) {
super(property);
this.livyURL = property.getProperty("zeppelin.livy.url");
this.displayAppInfo = Boolean.parseBoolean(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@

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;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* Base class for PySpark Interpreter
*/
public abstract class LivyPySparkBaseInterpreter extends BaseLivyInterprereter {
public abstract class LivyPySparkBaseInterpreter extends BaseLivyInterpreter {

public LivyPySparkBaseInterpreter(Properties property) {
super(property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@

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;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,12 @@

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;
import java.util.concurrent.ConcurrentHashMap;

/**
* Livy Spark interpreter for Zeppelin.
*/
public class LivySparkInterpreter extends BaseLivyInterprereter {
public class LivySparkInterpreter extends BaseLivyInterpreter {

public LivySparkInterpreter(Properties property) {
super(property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,13 @@

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 LivySparkRInterpreter extends BaseLivyInterprereter {
public class LivySparkRInterpreter extends BaseLivyInterpreter {

public LivySparkRInterpreter(Properties property) {
super(property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/**
* Livy SparkSQL Interpreter for Zeppelin.
*/
public class LivySparkSQLInterpreter extends BaseLivyInterprereter {
public class LivySparkSQLInterpreter extends BaseLivyInterpreter {

public static final String ZEPPELIN_LIVY_SPARK_SQL_FIELD_TRUNCATE =
"zeppelin.livy.spark.sql.field.truncate";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public void testLivyTutorialNote() throws IOException {
}
}

private boolean isSpark2(BaseLivyInterprereter interpreter, InterpreterContext context) {
private boolean isSpark2(BaseLivyInterpreter interpreter, InterpreterContext context) {
InterpreterResult result = null;
if (interpreter instanceof LivySparkRInterpreter) {
result = interpreter.interpret("sparkR.session()", context);
Expand Down