zjffdu commented on a change in pull request #3383: [ZEPPELIN-4104] Zeppelin 
Interpreter On Docker
URL: https://github.com/apache/zeppelin/pull/3383#discussion_r293234986
 
 

 ##########
 File path: 
zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterLauncher.java
 ##########
 @@ -0,0 +1,79 @@
+/*
+ * 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.interpreter.launcher;
+
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.apache.zeppelin.interpreter.recovery.RecoveryStorage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Interpreter Launcher which use shell script to launch the interpreter 
process.
+ */
+public class DockerInterpreterLauncher extends InterpreterLauncher {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(DockerInterpreterLauncher.class);
+
+  private InterpreterLaunchContext context;
+
+  public DockerInterpreterLauncher(ZeppelinConfiguration zConf, 
RecoveryStorage recoveryStorage)
+      throws IOException {
+    super(zConf, recoveryStorage);
+  }
+
+  @Override
+  public InterpreterClient launch(InterpreterLaunchContext context) throws 
IOException {
+    LOGGER.info("Launching Interpreter: " + 
context.getInterpreterSettingGroup());
+    this.context = context;
+    this.properties = context.getProperties();
+    int connectTimeout = getConnectTimeout();
+    if (connectTimeout < 200000) {
 
 Review comment:
   should provide one option for this configuration. Sometimes, even 200 
seconds is enough. 

----------------------------------------------------------------
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