@InterfaceAudience.Private public class SnapshotScannerHDFSAclHelper extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
static String |
ACL_SYNC_TO_HDFS_ENABLE |
static String |
ACL_SYNC_TO_HDFS_THREAD_NUMBER |
static String |
COMMON_DIRECTORY_PERMISSION |
static String |
COMMON_DIRECTORY_PERMISSION_DEFAULT |
static String |
SNAPSHOT_RESTORE_DIRECTORY_PERMISSION |
static String |
SNAPSHOT_RESTORE_DIRECTORY_PERMISSION_DEFAULT |
static String |
SNAPSHOT_RESTORE_TMP_DIR |
static String |
SNAPSHOT_RESTORE_TMP_DIR_DEFAULT |
| Constructor and Description |
|---|
SnapshotScannerHDFSAclHelper(org.apache.hadoop.conf.Configuration configuration,
Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTableAcl(TableName tableName,
Set<String> users,
String operation)
Add table user acls
|
void |
close() |
boolean |
grantAcl(UserPermission userPermission,
Set<String> skipNamespaces,
Set<TableName> skipTables)
Set acl when grant user permission
|
static boolean |
isAclSyncToHdfsEnabled(org.apache.hadoop.conf.Configuration conf) |
boolean |
removeNamespaceAccessAcl(TableName tableName,
Set<String> removeUsers,
String operation)
Remove table access acl from namespace dir when delete table
|
boolean |
removeNamespaceDefaultAcl(String namespace,
Set<String> removeUsers)
Remove default acl from namespace archive dir when delete namespace
|
boolean |
removeTableAcl(TableName tableName,
Set<String> users)
Remove table acls when modify table
|
boolean |
removeTableDefaultAcl(TableName tableName,
Set<String> removeUsers)
Remove default acl from table archive dir when delete table
|
boolean |
revokeAcl(UserPermission userPermission,
Set<String> skipNamespaces,
Set<TableName> skipTables)
Remove acl when grant or revoke user permission
|
void |
setCommonDirectoryPermission() |
boolean |
snapshotAcl(SnapshotDescription snapshot)
Set acl when take a snapshot
|
public static final String ACL_SYNC_TO_HDFS_ENABLE
public static final String ACL_SYNC_TO_HDFS_THREAD_NUMBER
public static final String SNAPSHOT_RESTORE_TMP_DIR
public static final String SNAPSHOT_RESTORE_TMP_DIR_DEFAULT
public static final String COMMON_DIRECTORY_PERMISSION
public static final String COMMON_DIRECTORY_PERMISSION_DEFAULT
public static final String SNAPSHOT_RESTORE_DIRECTORY_PERMISSION
public static final String SNAPSHOT_RESTORE_DIRECTORY_PERMISSION_DEFAULT
public SnapshotScannerHDFSAclHelper(org.apache.hadoop.conf.Configuration configuration,
Connection connection)
throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void setCommonDirectoryPermission()
throws IOException
IOExceptionpublic boolean grantAcl(UserPermission userPermission, Set<String> skipNamespaces, Set<TableName> skipTables)
userPermission - the user and permissionskipNamespaces - the namespace set to skip set acl because already setskipTables - the table set to skip set acl because already setpublic boolean revokeAcl(UserPermission userPermission, Set<String> skipNamespaces, Set<TableName> skipTables)
userPermission - the user and permissionskipNamespaces - the namespace set to skip remove aclskipTables - the table set to skip remove aclpublic boolean snapshotAcl(SnapshotDescription snapshot)
snapshot - the snapshot descpublic boolean removeNamespaceAccessAcl(TableName tableName, Set<String> removeUsers, String operation)
tableName - the tableremoveUsers - the users whose access acl will be removedpublic boolean removeNamespaceDefaultAcl(String namespace, Set<String> removeUsers)
namespace - the namespaceremoveUsers - the users whose default acl will be removedpublic boolean removeTableDefaultAcl(TableName tableName, Set<String> removeUsers)
tableName - the table nameremoveUsers - the users whose default acl will be removedpublic boolean addTableAcl(TableName tableName, Set<String> users, String operation)
tableName - the tableusers - the table users with READ permissionpublic boolean removeTableAcl(TableName tableName, Set<String> users)
tableName - the tableusers - the table users with READ permissionpublic static boolean isAclSyncToHdfsEnabled(org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.