public static boolean validateURL(String webhdfsUrl, String[] schemes) {
    RegexValidator authority = new RegexValidator(".*");
    UrlValidator urlValidator = new UrlValidator(schemes, authority, UrlValidator.ALLOW_LOCAL_URLS);
    return urlValidator.isValid(webhdfsUrl);
  }
Validates filesystem URL
@param webhdfsUrl url
@return is url valid
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java