private int callQaService() throws IOException {
    String localIp = NetworkInterfaceManager.INSTANCE.getLocalHostAddress();
    String qaServiceUrlPrefix = task.getQaServiceUrlPrefix();
    DomainHealthCheckInfo deployInfo =
        new DomainHealthCheckInfo(
            task.getDomain(),
            config.getEnv(),
            localIp,
            config.getContainerPort(),
            qaServiceUrlPrefix);

    int exitCode = DeployStep.CODE_OK;
    if (!StringUtils.isEmpty(StringUtils.trimAll(qaServiceUrlPrefix))) {
      logger.info(
          String.format(
              "qa service url is given, checking domain status via %s", qaServiceUrlPrefix));

      CheckResult checkResult = CheckResult.FAIL;
      try {
        checkResult =
            qaService.isDomainHealthy(
                deployInfo, config.getQaServiceTimeout(), config.getQaServiceQueryInterval());
      } catch (RuntimeException e) {
        checkResult = CheckResult.AGENT_LOCAL_EXCEPTION;
        logger.error("agent local exception when calling qa service", e);
      }

      exitCode = qaCheckResultToExitCode(checkResult);
    } else {
      logger.info("qa service url is not given, skip checking domain status");
    }
    return exitCode;
  }
 private int runShellCmd(String shellFunc) throws Exception {
   String script =
       jointShellCmd(
           task.getDomain(),
           task.getKernelVersion(),
           config.getContainerType().toString(),
           shellFunc);
   int exitCode = scriptExecutor.exec(script, logOut, logOut);
   return exitCode;
 }
  private void doInjectPhoenixLoader() throws Exception {
    File serverXml = config.getServerXml();
    if (serverXml == null || !serverXml.exists()) {
      throw new RuntimeException("container server.xml not found");
    }

    File kernelDocBase =
        new File(
            String.format(
                config.getKernelDocBasePattern(), task.getDomain(), task.getKernelVersion()));
    String domainDocBasePattern =
        String.format(config.getDomainDocBaseFeaturePattern(), task.getDomain());
    ServerXmlUtil.attachPhoenixContextLoader(
        serverXml, domainDocBasePattern, config.getLoaderClass(), kernelDocBase);
  }