Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/4720#issuecomment-75484273
  
    @JoshRosen Using another `Future` to check whether the server process ends 
prematurely is not doable, because the Thrift server is started by 
`spark-daemon.sh`, which is asynchronous. Basically there are several cases 
that may fail the test suites:
    
    1. Server fails to start because of port conflict
    1. Server fails to start because of misconfigured classpath (e.g. 
datanucleus jars not found, etc.)
    1. Server fails to start because another server instance was started within 
the same Spark home directory.
    1. Server instance killed by `kill -9`
    1. Log file missing or mark lines not found, thus causes time out
    
    According to prior experiences, 1, 2 and 5 are most commonly seen, while 3 
and 4 were not observed. In the case of 1 and 2, server instance stops 
gracefully and print related log lines. 5 is now fixed by the `tail -n +0 -f` 
trick. Log4j.properties issues similar to the previous jets3t case should be 
fixed separately. Thus I chose to check for specific log line to see whether 
the server instance ends prematurely.
    
    Reusing the same server instance within a test suite also reduces undesired 
flakiness.


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