@Path("{clusterName}/hosts")
  public HostService getHostHandler(@Context jakarta.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) {
    return new HostService(clusterName);
  }
Get the hosts sub-resource

@param request      the request
@param clusterName  cluster id

@return the hosts service
ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java