protected CommandProvider getCommandProvider(ServiceType service) throws IOException {
    switch (service) {
      case HADOOP_DATANODE:
      case HADOOP_NAMENODE:
        return new HadoopShellCommandProvider(getConf());
      case ZOOKEEPER_SERVER:
        return new ZookeeperShellCommandProvider(getConf());
      default:
        Class<? extends CommandProvider> provider =
          getConf().getClass("hbase.it.clustermanager.hbase.command.provider",
            HBaseShellCommandProvider.class, CommandProvider.class);
        return ReflectionUtils.newInstance(provider, getConf());
    }
  }
CommandProvider to manage the service using bin/zk* scripts.
hbase-it/src/test/java/org/apache/hadoop/hbase/HBaseClusterManager.java