zjffdu commented on a change in pull request #3331: [Zeppelin-4049] Hadoop 
Submarine (Machine Learning) interpreter
URL: https://github.com/apache/zeppelin/pull/3331#discussion_r264600429
 
 

 ##########
 File path: 
submarine/src/main/java/org/apache/zeppelin/submarine/PySubmarineInterpreter.java
 ##########
 @@ -0,0 +1,84 @@
+/*
+ * Licensed 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.submarine;
+
+import org.apache.zeppelin.interpreter.InterpreterContext;
+import org.apache.zeppelin.interpreter.InterpreterException;
+import org.apache.zeppelin.interpreter.InterpreterResult;
+import org.apache.zeppelin.interpreter.thrift.ParagraphInfo;
+import org.apache.zeppelin.python.IPythonInterpreter;
+import org.apache.zeppelin.python.PythonInterpreter;
+import org.apache.zeppelin.submarine.commons.SubmarineConstants;
+import org.apache.zeppelin.submarine.job.SubmarineJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.Properties;
+
+public class PySubmarineInterpreter extends PythonInterpreter {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(PySubmarineInterpreter.class);
+
+  private SubmarineInterpreter submarineInterpreter = null;
+  private SubmarineContext submarineContext = null;
+
+  public PySubmarineInterpreter(Properties property) {
+    super(property);
+    submarineContext = SubmarineContext.getInstance();
+  }
+
+  @Override
+  public InterpreterResult interpret(String st, InterpreterContext context)
+      throws InterpreterException {
+    // algorithm & checkpoint path support replaces ${username} with real user 
name
+    String algorithmPath = properties.getProperty(
 
 Review comment:
   Should this piece of code be applied in IPySubmarineInterpreter ? IIUC, 
IPySubmarineInterpreter should behave the same as PySubmarineInterpreter except 
more ipython features

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to