Package org.apache.hadoop.yarn.util
Class ConverterUtils
java.lang.Object
org.apache.hadoop.yarn.util.ConverterUtils
This class contains a set of utilities which help converting data structures
from/to 'serializableFormat' to/from hadoop/nativejava data structures.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends TokenIdentifier>
Token<T>convertFromYarn(Token protoToken, InetSocketAddress serviceAddr) Convert a protobuf token into a rpc token and set its service.static <T extends TokenIdentifier>
Token<T>convertFromYarn(Token protoToken, Text service) Convert a protobuf token into a rpc token and set its service.static PathgetPathFromYarnURL(URL url) Deprecated.static URLgetYarnUrlFromPath(Path path) Deprecated.static URLgetYarnUrlFromURI(URI uri) Deprecated.static ApplicationAttemptIdtoApplicationAttemptId(String applicationAttemptIdStr) Deprecated.static ApplicationIdtoApplicationId(String appIdStr) Deprecated.static ApplicationIdtoApplicationId(org.apache.hadoop.yarn.factories.RecordFactory recordFactory, String applicationIdStr) Deprecated.static ContainerIdtoContainerId(String containerIdStr) Deprecated.static NodeIdDeprecated.static NodeIdtoNodeIdWithDefaultPort(String nodeIdStr) static StringtoString(ApplicationId appId) Deprecated.static StringtoString(ContainerId cId) Deprecated.
-
Field Details
-
APPLICATION_PREFIX
- See Also:
-
CONTAINER_PREFIX
- See Also:
-
APPLICATION_ATTEMPT_PREFIX
- See Also:
-
-
Constructor Details
-
ConverterUtils
public ConverterUtils()
-
-
Method Details
-
getPathFromYarnURL
Deprecated.return a hadoop path from a given url This method is deprecated, useURL.toPath()instead.- Parameters:
url- url to convert- Returns:
- path from
URL - Throws:
URISyntaxException- exception thrown to indicate that a string could not be parsed as a URI reference.
-
getYarnUrlFromPath
Deprecated. -
getYarnUrlFromURI
Deprecated. -
toString
Deprecated. -
toApplicationId
@Public @Deprecated public static ApplicationId toApplicationId(org.apache.hadoop.yarn.factories.RecordFactory recordFactory, String applicationIdStr) Deprecated. -
toString
Deprecated. -
toNodeIdWithDefaultPort
-
toNodeId
Deprecated. -
toContainerId
Deprecated. -
toApplicationAttemptId
@Public @Deprecated public static ApplicationAttemptId toApplicationAttemptId(String applicationAttemptIdStr) Deprecated. -
toApplicationId
Deprecated. -
convertFromYarn
public static <T extends TokenIdentifier> Token<T> convertFromYarn(Token protoToken, InetSocketAddress serviceAddr) Convert a protobuf token into a rpc token and set its service. Supposed to be used for tokens other than RMDelegationToken. For RMDelegationToken, useconvertFromYarn(org.apache.hadoop.yarn.api.records.Token, org.apache.hadoop.io.Text)instead.- Type Parameters:
T- Generic Type T.- Parameters:
protoToken- the yarn tokenserviceAddr- the connect address for the service- Returns:
- rpc token
-
convertFromYarn
Convert a protobuf token into a rpc token and set its service.- Type Parameters:
T- Generic Type T.- Parameters:
protoToken- the yarn tokenservice- the service for the token- Returns:
- rpc token
-