You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Jose Luis López (Jira)" <ji...@apache.org> on 2026/08/13 13:20:00 UTC
[jira] [Created] (YARN-11984) Federation mock sub-cluster and router do not stop cleanly on SIGTERM
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: yarn-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-dev-help@hadoop.apache.org