private static void ChaosServiceStart(Configuration conf, ChaosServiceName serviceName) {
    switch (serviceName) {
      case CHAOSAGENT:
        ChaosAgent.stopChaosAgent.set(false);
        try {
          String hostname = InetAddress.getLocalHost().getHostName();
          String quorum = ZKConfig.getZKQuorumServersString(conf);
          LOG.info("Starting the ChaosAgent with hostname: {}, quorum: {}", hostname, quorum);

          Thread t = new Thread(new ChaosAgent(conf, quorum, hostname));
          t.start();
          t.join();
        } catch (InterruptedException | UnknownHostException e) {
          LOG.error("Failed while executing next task execution of ChaosAgent on : {}", serviceName,
            e);
        }
        break;
      default:
        LOG.error("Service Name not known : " + serviceName.toString());
    }
  }
Class used to start/stop Chaos related services (currently chaosagent)
hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosService.java