public List<String> getHostNamesByHostIds(List<Long> hostIds) {
    List<String> hostNames = new ArrayList<>();
    if (hostIds != null) {
      for (Long hostId : hostIds) {
        HostEntity hostEntity = findById(hostId);
        hostNames.add(hostEntity.getHostName());
      }
    }
    return hostNames;
  }
Refreshes entity state from database
@param hostEntity entity to refresh
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostDAO.java