List of usage examples for org.apache.hadoop.registry.client.binding RegistryPathUtils encodeForRegistry
public static String encodeForRegistry(String element)
From source file:org.apache.slider.client.SliderClient.java
License:Apache License
/** * Look up an instance//from w w w. j a v a 2s .c om * @return instance data * @throws SliderException other failures * @throws IOException IO problems or wrapped exceptions */ private ServiceRecord lookupServiceRecord(ActionRegistryArgs registryArgs) throws SliderException, IOException { String user; if (StringUtils.isNotEmpty(registryArgs.user)) { user = RegistryPathUtils.encodeForRegistry(registryArgs.user); } else { user = currentUser(); } String path = servicePath(user, registryArgs.serviceType, registryArgs.name); return resolve(path); }