zjffdu commented on a change in pull request #3650: [ZEPPELIN-4600] nullpoint
error in the long time process use api to run a note
URL: https://github.com/apache/zeppelin/pull/3650#discussion_r379776174
##########
File path:
zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterProcess.java
##########
@@ -51,13 +54,27 @@ public void
setRemoteInterpreterEventPoller(RemoteInterpreterEventPoller eventPo
this.remoteInterpreterEventPoller = eventPoller;
}
+ public void shutdown()
+ {
+
+ // Close client socket connection
+ if (clientFactory != null)
+ {
+ for (TSocket eachTransfer: clientFactory.clientSocketMap.values())
+ {
+ eachTransfer.close();
+ }
+ }
+ }
+
public int getConnectTimeout() {
return connectTimeout;
}
public synchronized Client getClient() throws Exception {
if (clientPool == null || clientPool.isClosed()) {
- clientPool = new GenericObjectPool<>(new ClientFactory(getHost(),
getPort()));
+ clientFactory = new ClientFactory(getHost(), getPort());
+ clientPool = new GenericObjectPool<>(clientFactory);
Review comment:
This change is not necessary ?
----------------------------------------------------------------
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