felixcheung 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_r324962214
##########
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);
+ } finally {
+ try {
+ docker.removeContainer(containerName);
Review comment:
same here
----------------------------------------------------------------
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