diff --git a/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java b/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java index bdc5b868605..ab29efe9b7b 100644 --- a/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java +++ b/r/src/main/java/org/apache/zeppelin/rinterpreter/KnitR.java @@ -34,12 +34,12 @@ public class KnitR extends Interpreter implements WrappedInterpreter { KnitRInterpreter intp; - public KnitR(Properties property, Boolean startSpark) { - super(property); - intp = new KnitRInterpreter(property, startSpark); + public KnitR(Properties properties, Boolean startSpark) { + super(properties); + intp = new KnitRInterpreter(properties, startSpark); } - public KnitR(Properties property) { - this(property, true); + public KnitR(Properties properties) { + this(properties, true); } public KnitR() { @@ -47,38 +47,39 @@ public KnitR() { } @Override - public void open() { + public void open() throws InterpreterException { intp.open(); } @Override - public void close() { + public void close() throws InterpreterException { intp.close(); } @Override - public InterpreterResult interpret(String s, InterpreterContext interpreterContext) { + public InterpreterResult interpret(String s, InterpreterContext interpreterContext) + throws InterpreterException { return intp.interpret(s, interpreterContext); } @Override - public void cancel(InterpreterContext interpreterContext) { + public void cancel(InterpreterContext interpreterContext) throws InterpreterException { intp.cancel(interpreterContext); } @Override - public FormType getFormType() { + public FormType getFormType() throws InterpreterException { return intp.getFormType(); } @Override - public int getProgress(InterpreterContext interpreterContext) { + public int getProgress(InterpreterContext interpreterContext) throws InterpreterException { return intp.getProgress(interpreterContext); } @Override public List completion(String s, int i, - InterpreterContext interpreterContext) { + InterpreterContext interpreterContext) throws InterpreterException { List completion = intp.completion(s, i, interpreterContext); return completion; } @@ -94,14 +95,14 @@ public Scheduler getScheduler() { } @Override - public void setProperty(Properties property) { - super.setProperty(property); - intp.setProperty(property); + public void setProperties(Properties properties) { + super.setProperties(properties); + intp.setProperties(properties); } @Override - public Properties getProperty() { - return intp.getProperty(); + public Properties getProperties() { + return intp.getProperties(); } @Override diff --git a/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java b/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java index 81891f80ce7..bdf7dae8765 100644 --- a/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java +++ b/r/src/main/java/org/apache/zeppelin/rinterpreter/RRepl.java @@ -34,12 +34,12 @@ public class RRepl extends Interpreter implements WrappedInterpreter { RReplInterpreter intp; - public RRepl(Properties property, Boolean startSpark) { - super(property); - intp = new RReplInterpreter(property, startSpark); + public RRepl(Properties properties, Boolean startSpark) { + super(properties); + intp = new RReplInterpreter(properties, startSpark); } - public RRepl(Properties property) { - this(property, true); + public RRepl(Properties properties) { + this(properties, true); } public RRepl() { @@ -47,38 +47,39 @@ public RRepl() { } @Override - public void open() { + public void open() throws InterpreterException { intp.open(); } @Override - public void close() { + public void close() throws InterpreterException { intp.close(); } @Override - public InterpreterResult interpret(String s, InterpreterContext interpreterContext) { + public InterpreterResult interpret(String s, InterpreterContext interpreterContext) + throws InterpreterException { return intp.interpret(s, interpreterContext); } @Override - public void cancel(InterpreterContext interpreterContext) { + public void cancel(InterpreterContext interpreterContext) throws InterpreterException { intp.cancel(interpreterContext); } @Override - public FormType getFormType() { + public FormType getFormType() throws InterpreterException { return intp.getFormType(); } @Override - public int getProgress(InterpreterContext interpreterContext) { + public int getProgress(InterpreterContext interpreterContext) throws InterpreterException { return intp.getProgress(interpreterContext); } @Override public List completion(String s, int i, - InterpreterContext interpreterContext) { + InterpreterContext interpreterContext) throws InterpreterException { List completion = intp.completion(s, i, interpreterContext); return completion; } @@ -94,14 +95,14 @@ public Scheduler getScheduler() { } @Override - public void setProperty(Properties property) { - super.setProperty(property); - intp.setProperty(property); + public void setProperties(Properties properties) { + super.setProperties(properties); + intp.setProperties(properties); } @Override - public Properties getProperty() { - return intp.getProperty(); + public Properties getProperties() { + return intp.getProperties(); } @Override diff --git a/r/src/main/scala/org/apache/zeppelin/rinterpreter/KnitRInterpreter.scala b/r/src/main/scala/org/apache/zeppelin/rinterpreter/KnitRInterpreter.scala index bc779c7a4f1..64b1d2686e5 100644 --- a/r/src/main/scala/org/apache/zeppelin/rinterpreter/KnitRInterpreter.scala +++ b/r/src/main/scala/org/apache/zeppelin/rinterpreter/KnitRInterpreter.scala @@ -27,9 +27,9 @@ import org.apache.zeppelin.interpreter.InterpreterResult import org.apache.zeppelin.rinterpreter.rscala.RException -class KnitRInterpreter(property: Properties, startSpark : Boolean = true) extends RInterpreter(property, startSpark) { - def this(property : Properties) = { - this(property, true) +class KnitRInterpreter(properties: Properties, startSpark : Boolean = true) extends RInterpreter(properties, startSpark) { + def this(properties : Properties) = { + this(properties, true) } override def open: Unit = { diff --git a/r/src/main/scala/org/apache/zeppelin/rinterpreter/RInterpreter.scala b/r/src/main/scala/org/apache/zeppelin/rinterpreter/RInterpreter.scala index 9f5181d1bf7..0783f6c38c2 100644 --- a/r/src/main/scala/org/apache/zeppelin/rinterpreter/RInterpreter.scala +++ b/r/src/main/scala/org/apache/zeppelin/rinterpreter/RInterpreter.scala @@ -41,7 +41,7 @@ abstract class RInterpreter(properties : Properties, startSpark : Boolean = true def getrContext: RContext = rContext - protected lazy val rContext : RContext = synchronized{ RContext(property, this.getInterpreterGroup().getId()) } + protected lazy val rContext : RContext = synchronized{ RContext(properties, this.getInterpreterGroup().getId()) } def open: Unit = rContext.synchronized { logger.trace("RInterpreter opening") diff --git a/r/src/main/scala/org/apache/zeppelin/rinterpreter/RReplInterpreter.scala b/r/src/main/scala/org/apache/zeppelin/rinterpreter/RReplInterpreter.scala index 63be30240c0..013ccd8dd88 100644 --- a/r/src/main/scala/org/apache/zeppelin/rinterpreter/RReplInterpreter.scala +++ b/r/src/main/scala/org/apache/zeppelin/rinterpreter/RReplInterpreter.scala @@ -26,12 +26,12 @@ import org.apache.zeppelin.interpreter.InterpreterContext import org.apache.zeppelin.interpreter.InterpreterResult import org.apache.zeppelin.rinterpreter.rscala.RException -class RReplInterpreter(property: Properties, startSpark : Boolean = true) extends RInterpreter(property, startSpark) { +class RReplInterpreter(properties: Properties, startSpark : Boolean = true) extends RInterpreter(properties, startSpark) { - // protected val rContext : RContext = RContext(property) + // protected val rContext : RContext = RContext(properties) - def this(property : Properties) = { - this(property, true) + def this(properties : Properties) = { + this(properties, true) } private var firstCell : Boolean = true def interpret(st: String, context: InterpreterContext): InterpreterResult = { diff --git a/r/src/test/scala/org/apache/zeppelin/rinterpreter/RInterpreterTest.scala b/r/src/test/scala/org/apache/zeppelin/rinterpreter/RInterpreterTest.scala index 72085162aad..443394c4083 100644 --- a/r/src/test/scala/org/apache/zeppelin/rinterpreter/RInterpreterTest.scala +++ b/r/src/test/scala/org/apache/zeppelin/rinterpreter/RInterpreterTest.scala @@ -85,7 +85,7 @@ class RInterpreterTest extends FlatSpec { it should "have persistent properties" in { val props = new Properties() props.setProperty("hello", "world") - rint.setProperty(props) + rint.setProperties(props) assertResult("world") { rint.getProperty("hello") } 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 0536825204f..71a439f4978 100644 --- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java +++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java @@ -932,7 +932,7 @@ public String getSparkUIUrl() { return sparkUrl; } - String sparkUrlProp = property.getProperty("zeppelin.spark.uiWebUrl", ""); + String sparkUrlProp = getProperty("zeppelin.spark.uiWebUrl", ""); if (!StringUtils.isBlank(sparkUrlProp)) { return sparkUrlProp; }