code: public static NodeInfo[] generateOrderedNodeInfos(Collection<WorkerInfo> workerInfos) {
      NodeInfo[] ret = new NodeInfo[workerInfos.size()];
      int index = 0;
      for (WorkerInfo workerInfo : workerInfos) {
        ret[index++] = new NodeInfo(workerInfo);
      }
      Arrays.sort(ret);
  
      return ret;
    }
docs: Order the nodes by hostName and generate {@link NodeInfo} list for UI display.
  
  @param workerInfos the list of {@link WorkerInfo} objects
  @return the list of {@link NodeInfo} objects