private String getHostnameFromURL(String url) {
        try {
            URL u = new URL(url);
            return u.getHost();
        } catch (MalformedURLException e) {
            log.warn("Failed to extract hostname from URL: {}", e.getMessage());
            return null;
        }
    }
Extracts the hostname from the given URL.

@param url The URL from which to extract the hostname.
@return The extracted hostname.
inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/service/MasterServiceImpl.java