@Override
  public void stateChanged(Service service) {
    if (service.getServiceState() == Service.STATE.STARTED) {
      if (service instanceof LlapRegistryService) {
        setupLlapRegistryService((LlapRegistryService) service);
      }
      start();
    } else if (service.getServiceState() == Service.STATE.STOPPED) {
      shutdown();
    }
  }
Collect metrics from the llap daemons in every given milliseconds.
llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/metrics/LlapMetricsCollector.java