Class URL
java.lang.Object
org.apache.hadoop.yarn.api.records.URL
URL represents a serializable URL.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLstatic URLfromPath(Path path, Configuration conf) static URLstatic URLfromURI(URI uri, Configuration conf) abstract StringgetFile()Get the file of the URL.abstract StringgetHost()Get the host of the URL.abstract intgetPort()Get the port of the URL.abstract StringGet the scheme of the URL.abstract StringGet the user info of the URL.static URLnewInstance(String scheme, String host, int port, String file) abstract voidSet the file of the URL.abstract voidSet the host of the URL.abstract voidsetPort(int port) Set the port of the URLabstract voidSet the scheme of the URLabstract voidsetUserInfo(String userInfo) Set the user info of the URL.toPath()
-
Constructor Details
-
URL
public URL()
-
-
Method Details
-
newInstance
-
getScheme
Get the scheme of the URL.- Returns:
- scheme of the URL
-
setScheme
Set the scheme of the URL- Parameters:
scheme- scheme of the URL
-
getUserInfo
Get the user info of the URL.- Returns:
- user info of the URL
-
setUserInfo
Set the user info of the URL.- Parameters:
userInfo- user info of the URL
-
getHost
Get the host of the URL.- Returns:
- host of the URL
-
setHost
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
Get the file of the URL.- Returns:
- file of the URL
-
setFile
Set the file of the URL.- Parameters:
file- file of the URL
-
toPath
- Throws:
URISyntaxException
-
fromURI
-
fromURI
-
fromPath
-
fromPath
-