java.lang.Object
org.apache.hadoop.yarn.api.records.URL

@Public @Stable public abstract class URL extends Object

URL represents a serializable URL.

  • Constructor Details

    • URL

      public URL()
  • Method Details

    • newInstance

      @Public @Stable public static URL newInstance(String scheme, String host, int port, String file)
    • getScheme

      @Public @Stable public abstract String getScheme()
      Get the scheme of the URL.
      Returns:
      scheme of the URL
    • setScheme

      @Public @Stable public abstract void setScheme(String scheme)
      Set the scheme of the URL
      Parameters:
      scheme - scheme of the URL
    • getUserInfo

      @Public @Stable public abstract String getUserInfo()
      Get the user info of the URL.
      Returns:
      user info of the URL
    • setUserInfo

      @Public @Stable public abstract void setUserInfo(String userInfo)
      Set the user info of the URL.
      Parameters:
      userInfo - user info of the URL
    • getHost

      @Public @Stable public abstract String getHost()
      Get the host of the URL.
      Returns:
      host of the URL
    • setHost

      @Public @Stable public abstract void setHost(String host)
      Set the host of the URL.
      Parameters:
      host - host of the URL
    • getPort

      @Public @Stable public abstract int getPort()
      Get the port of the URL.
      Returns:
      port of the URL
    • setPort

      @Public @Stable public abstract void setPort(int port)
      Set the port of the URL
      Parameters:
      port - port of the URL
    • getFile

      @Public @Stable public abstract String getFile()
      Get the file of the URL.
      Returns:
      file of the URL
    • setFile

      @Public @Stable public abstract void setFile(String file)
      Set the file of the URL.
      Parameters:
      file - file of the URL
    • toPath

      @Public @Stable public Path toPath() throws URISyntaxException
      Throws:
      URISyntaxException
    • fromURI

      @Private @VisibleForTesting public static URL fromURI(URI uri, Configuration conf)
    • fromURI

      @Public @Stable public static URL fromURI(URI uri)
    • fromPath

      @Private @VisibleForTesting public static URL fromPath(Path path, Configuration conf)
    • fromPath

      @Public @Stable public static URL fromPath(Path path)