@InterfaceAudience.Private public class ConverterUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_ATTEMPT_PREFIX |
static String |
APPLICATION_PREFIX |
static String |
CONTAINER_PREFIX |
Constructor and Description |
---|
ConverterUtils() |
Modifier and Type | Method and Description |
---|---|
static <T extends TokenIdentifier> |
convertFromYarn(Token protoToken,
InetSocketAddress serviceAddr)
Convert a protobuf token into a rpc token and set its service
|
static Map<String,String> |
convertToString(Map<CharSequence,CharSequence> env)
change from CharSequence to string for map key and value
|
static Path |
getPathFromYarnURL(URL url)
return a hadoop path from a given url
|
static URL |
getYarnUrlFromPath(Path path) |
static URL |
getYarnUrlFromURI(URI uri) |
static ApplicationAttemptId |
toApplicationAttemptId(String applicationAttmeptIdStr) |
static ApplicationId |
toApplicationId(RecordFactory recordFactory,
String appIdStr) |
static ApplicationId |
toApplicationId(String appIdStr) |
static ContainerId |
toContainerId(String containerIdStr) |
static NodeId |
toNodeId(String nodeIdStr) |
static String |
toString(ApplicationId appId) |
static String |
toString(ContainerId cId) |
public static final String APPLICATION_PREFIX
public static final String CONTAINER_PREFIX
public static final String APPLICATION_ATTEMPT_PREFIX
public static Path getPathFromYarnURL(URL url) throws URISyntaxException
url
- url to convertURL
URISyntaxException
public static Map<String,String> convertToString(Map<CharSequence,CharSequence> env)
env
- map for convertingpublic static String toString(ApplicationId appId)
public static ApplicationId toApplicationId(RecordFactory recordFactory, String appIdStr)
public static String toString(ContainerId cId)
public static ContainerId toContainerId(String containerIdStr)
public static ApplicationAttemptId toApplicationAttemptId(String applicationAttmeptIdStr)
public static ApplicationId toApplicationId(String appIdStr)
public static <T extends TokenIdentifier> Token<T> convertFromYarn(Token protoToken, InetSocketAddress serviceAddr)
protoToken
- the yarn tokenserviceAddr
- the connect address for the serviceCopyright © 2013 Apache Software Foundation. All rights reserved.