List of usage examples for org.apache.hadoop.registry.client.api RegistryConstants PATH_SYSTEM_SERVICES
String PATH_SYSTEM_SERVICES
To view the source code for org.apache.hadoop.registry.client.api RegistryConstants PATH_SYSTEM_SERVICES.
Click Source Link
From source file:org.apache.slider.client.ClientRegistryBinder.java
License:Apache License
/** * Buld the user path -switches to the system path if the user is "". * It also cross-converts the username to ascii via punycode * @param username username or ""/* ww w .ja v a2 s.co m*/ * @return the path to the user */ public static String homePathForUser(String username) { Preconditions.checkArgument(username != null, "null user"); // catch recursion if (username.startsWith(RegistryConstants.PATH_USERS)) { return username; } if (username.isEmpty()) { return RegistryConstants.PATH_SYSTEM_SERVICES; } // convert username to registry name String convertedName = convertUsername(username); return RegistryPathUtils.join(RegistryConstants.PATH_USERS, encodeForRegistry(convertedName)); }