liuxunorg commented on a change in pull request #3342: [ZEPPELIN-4031] Fixed 
Unable to detect that the interpreter process was killed manually
URL: https://github.com/apache/zeppelin/pull/3342#discussion_r268963065
 
 

 ##########
 File path: 
zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreter.java
 ##########
 @@ -103,7 +103,7 @@ public String getSessionId() {
   }
 
   public synchronized RemoteInterpreterProcess getOrCreateInterpreterProcess() 
throws IOException {
-    if (this.interpreterProcess != null) {
+    if (this.interpreterProcess != null && interpreterProcess.isRunning()) {
       return this.interpreterProcess;
     }
     ManagedInterpreterGroup intpGroup = getInterpreterGroup();
 
 Review comment:
   The original code is not perfect.
   Because `RemoteInterpreter.java::getOrCreateInterpreterProcess()` is called, 
an available RemoteInterpreter process must be returned.
   
   `interpreterProcess.isRunning()` Will call 
`RemoteInterpreterUtils.java::checkIfRemoteEndpointAccessible()` Check if the 
remote interpreter is available through the socket.

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