private String createHostString(List<String> list) {
    return list != null ? String.join(",", list) : StringUtils.EMPTY;
  }
Update the gathered data from reading output
ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java