When we stop CDAP master, we stop the system services run as a part of master.
when metrics.processor which is stopped, it stops dependent services
{MetricsCollectionService, MetricsProcessorStatusService, KafkaClientService, ZKClientService, MetricsProcessorService}
we noticed in the logs that all these dependent services were not stopped before terminating the twill runnable.
CDAP FIX VERSIONS
This issue needs to be fixed for:
-3.3.0 - DONE-
-3.2.1 - DONE-
-3.1.3 - DONE-
-3.0.6 - DONE-
-2.8.3 - DONE-
Fixed an issue about stopping all dependent services when a service is stopped.
This is due to a bug in co.cask.cdap.common.twill.AbstractMasterTwillRunnable, where we don't wait for the future on the services to get started or stopped.
This is a critical fix that needs to be back ported to 2.8, 3.0 and 3.1
https://github.com/caskdata/cdap/pull/4288 - porting to 3.1
https://github.com/caskdata/cdap/pull/4289 - porting to 3.0
https://github.com/caskdata/cdap/pull/4291 - porting to 2.8