throw new HBaseException("Malformed TTL string: TTL values in seconds and human readable" + "format do not match");
/** * List all user permissions match the given regular expression for namespace * and verify each of them. * @param namespaceRegexWithoutPrefix the regualar expression for namespace, without NAMESPACE_PREFIX * @param expectedAmount the expected amount of user permissions returned * @param expectedNamespace the expected namespace of each user permission returned * @throws HBaseException in the case of any HBase exception when accessing hbase:acl table */ private void getNamespacePermissionsAndVerify(String namespaceRegexWithoutPrefix, int expectedAmount, String expectedNamespace) throws HBaseException { try { List<UserPermission> namespacePermissions = AccessControlClient.getUserPermissions( systemUserConnection, AccessControlLists.toNamespaceEntry(namespaceRegexWithoutPrefix)); assertTrue(namespacePermissions != null); assertEquals(expectedAmount, namespacePermissions.size()); for (UserPermission namespacePermission : namespacePermissions) { // Verify it is not a global user permission assertFalse(namespacePermission.getAccessScope() == Permission.Scope.GLOBAL); // Verify namespace is set NamespacePermission nsPerm = (NamespacePermission) namespacePermission.getPermission(); assertEquals(expectedNamespace, nsPerm.getNamespace()); } } catch (Throwable thw) { throw new HBaseException(thw); } }
throw new HBaseException("Malformed TTL string: TTL values in seconds and human readable" + "format do not match");
throw new HBaseException("Malformed TTL string: TTL values in seconds and human readable" + "format do not match");
/** * List all user permissions match the given regular expression for namespace * and verify each of them. * @param namespaceRegexWithoutPrefix the regualar expression for namespace, without NAMESPACE_PREFIX * @param expectedAmount the expected amount of user permissions returned * @param expectedNamespace the expected namespace of each user permission returned * @throws HBaseException in the case of any HBase exception when accessing hbase:acl table */ private void getNamespacePermissionsAndVerify(String namespaceRegexWithoutPrefix, int expectedAmount, String expectedNamespace) throws HBaseException { try { List<UserPermission> namespacePermissions = AccessControlClient.getUserPermissions( systemUserConnection, AccessControlLists.toNamespaceEntry(namespaceRegexWithoutPrefix)); assertTrue(namespacePermissions != null); assertEquals(expectedAmount, namespacePermissions.size()); for (UserPermission namespacePermission : namespacePermissions) { assertFalse(namespacePermission.isGlobal()); // Verify it is not a global user permission assertEquals(expectedNamespace, namespacePermission.getNamespace()); // Verify namespace is set } } catch (Throwable thw) { throw new HBaseException(thw); } }