Java Code Examples for org.apache.hadoop.registry.client.binding.RegistryUtils#homePathForUser()
The following examples show how to use
org.apache.hadoop.registry.client.binding.RegistryUtils#homePathForUser() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestRegistryOperations.java From hadoop with Apache License 2.0 | 6 votes |
@Test public void testComplexUsernames() throws Throwable { operations.mknode("/users/user with spaces", true); operations.mknode("/users/user-with_underscores", true); operations.mknode("/users/000000", true); operations.mknode("/users/-storm", true); operations.mknode("/users/windows\\ user", true); String home = RegistryUtils.homePathForUser("\u0413PA\u0414_3"); operations.mknode(home, true); operations.mknode( RegistryUtils.servicePath(home, "service.class", "service 4_5"), true); operations.mknode( RegistryUtils.homePathForUser("[email protected]"), true); operations.mknode( RegistryUtils.homePathForUser("hbase/[email protected]"), true); home = RegistryUtils.homePathForUser("ADMINISTRATOR/127.0.0.1"); assertTrue("No 'administrator' in " + home, home.contains("administrator")); operations.mknode( home, true); }
Example 2
Source File: TestRegistryOperations.java From big-c with Apache License 2.0 | 6 votes |
@Test public void testComplexUsernames() throws Throwable { operations.mknode("/users/user with spaces", true); operations.mknode("/users/user-with_underscores", true); operations.mknode("/users/000000", true); operations.mknode("/users/-storm", true); operations.mknode("/users/windows\\ user", true); String home = RegistryUtils.homePathForUser("\u0413PA\u0414_3"); operations.mknode(home, true); operations.mknode( RegistryUtils.servicePath(home, "service.class", "service 4_5"), true); operations.mknode( RegistryUtils.homePathForUser("[email protected]"), true); operations.mknode( RegistryUtils.homePathForUser("hbase/[email protected]"), true); home = RegistryUtils.homePathForUser("ADMINISTRATOR/127.0.0.1"); assertTrue("No 'administrator' in " + home, home.contains("administrator")); operations.mknode( home, true); }
Example 3
Source File: RegistryAdminService.java From hadoop with Apache License 2.0 | 2 votes |
/** * Get the path to a user's home dir * @param username username * @return a path for services underneath */ protected String homeDir(String username) { return RegistryUtils.homePathForUser(username); }
Example 4
Source File: RegistryAdminService.java From big-c with Apache License 2.0 | 2 votes |
/** * Get the path to a user's home dir * @param username username * @return a path for services underneath */ protected String homeDir(String username) { return RegistryUtils.homePathForUser(username); }