GitHub user JoshRosen opened a pull request:

    https://github.com/apache/spark/pull/9864

    [SPARK-11887] Close PersistenceEngine at the end of PersistenceEngineSuite 
tests

    In PersistenceEngineSuite, we do not call `close()` on the 
PersistenceEngine at the end of the test. For the ZooKeeperPersistenceEngine, 
this causes us to leak a ZooKeeper client, causing the logs of unrelated tests 
to be periodically spammed with connection error messages from that client:
    
    ```
    15/11/20 05:13:35.789 
pool-1-thread-1-ScalaTest-running-PersistenceEngineSuite-SendThread(localhost:15741)
 INFO ClientCnxn: Opening socket connection to server 
localhost/127.0.0.1:15741. Will not attempt to authenticate using SASL (unknown 
error)
    15/11/20 05:13:35.790 
pool-1-thread-1-ScalaTest-running-PersistenceEngineSuite-SendThread(localhost:15741)
 WARN ClientCnxn: Session 0x15124ff48dd0000 for server null, unexpected error, 
closing socket connection and attempting reconnect
    java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
        at 
org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
    ```
    
    This patch fixes this by using a `finally` block.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JoshRosen/spark 
close-zookeeper-client-in-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9864.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9864
    
----
commit ea9d063b4e5f6f8a8ac47f04284a3286b8fe1fa8
Author: Josh Rosen <[email protected]>
Date:   2015-11-20T18:40:12Z

    Close PersistenceEngine at the end of test.

----


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to