Jose Luis López created YARN-11984:
--------------------------------------
Summary: Federation mock sub-cluster and router do not stop
cleanly on SIGTERM
Key: YARN-11984
URL: https://issues.apache.org/jira/browse/YARN-11984
Project: Hadoop YARN
Issue Type: Test
Components: test
Reporter: Jose Luis López
Goal: the federation mock sub-cluster and mock router terminate cleanly when
the test harness stops them.
TestMockSubCluster and TestMockRouter are not tests - they have no @Test
methods. TestFederationSubCluster launches them as separate JVMs through
JavaProcess and stops them with Process#destroy, i.e. SIGTERM, which runs
shutdown hooks. Neither registers one, so the JVM dies with its
ResourceManagers, NodeManagers and Router services still running: no service
stop, and the ZooKeeper session and state directories are left to expire on
their own.
Fix:
* Register a CompositeServiceShutdownHook in both, before init/start, so a
failure part-way through startup still tears down whatever came up.
Router#main already does exactly this; TestMockRouter starts the Router
directly and skips it.
* TestMockRouter also closes the ZooKeeper-backed FederationStateStore it
hands to FederationStateStoreFacade, which never closes it. That hook runs
at lower priority than the Router's - ShutdownHookManager runs highest
first - so the Router is fully stopped before its store goes away.
This is not a mini-cluster leak (see YARN-11983): these clusters are meant to
outlive the method that starts them. The defect is unclean termination.
Test-scope only; no production code is touched.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]