Github user HeartSaVioR commented on the pull request:
https://github.com/apache/incubator-zeppelin/pull/576#issuecomment-167691292
We can even provide way to validate Client instance with new "ping".
1. Implement validateObject() to ClientFactory.
```
@Override
public boolean validateObject(PooledObject<Client> p) {
final Client client = p.getObject();
try {
return client.ping().equals("pong");
} catch (Exception e) {
return false;
}
}
```
2. Build a strategy to exclude invalid objects via providing
GenericObjectPoolConfig to GenericObjectPool.
https://commons.apache.org/proper/commons-pool/apidocs/org/apache/commons/pool2/impl/GenericObjectPoolConfig.html
We can even set max idle, min idle, max total which helps to control total
thrift connections per remote interpreter process.
If we think it would be better to have, I'll address to this PR, or another
PR. (when we don't want to merge this PR)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---