liuxunorg commented on a change in pull request #3445: [ZEPPELIN-4263] Fixed 
cluster docker mode cannot exit the container of the remote interpreter
URL: https://github.com/apache/zeppelin/pull/3445#discussion_r325048782
 
 

 ##########
 File path: 
zeppelin-plugins/launcher/docker/src/main/java/org/apache/zeppelin/interpreter/launcher/DockerInterpreterProcess.java
 ##########
 @@ -340,16 +353,28 @@ public Void call(RemoteInterpreterService.Client client) 
throws Exception {
 
       // Remove container
       docker.removeContainer(containerName);
-    } catch (DockerException e) {
-      e.printStackTrace();
-    } catch (InterruptedException e) {
-      e.printStackTrace();
+    } catch (DockerException | InterruptedException e) {
+      LOGGER.error(e.getMessage(), e);
     }
 
     // Close the docker client
     docker.close();
   }
 
+  private void removeExistContainer(String containerName) {
+    try {
+      docker.killContainer(containerName);
+    } catch (DockerException | InterruptedException e) {
+      LOGGER.error(e.getMessage(), e);
 
 Review comment:
   done.
   Increase the judgment of whether there is a container with the same name.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to