Class TestHDFSAclHelper
java.lang.Object
org.apache.hadoop.hbase.security.access.TestHDFSAclHelper
-
Field Summary
Modifier and TypeFieldDescription(package private) static final byte[]
(package private) static final byte[]
private static final org.slf4j.Logger
private static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static void
canUserScanSnapshot
(HBaseTestingUtil util, org.apache.hadoop.hbase.security.User user, String snapshot, int expectedRowCount) Check if user is able to read expected rows from the specific snapshot(package private) static org.apache.hadoop.hbase.client.Table
createMobTable
(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) (package private) static void
createNamespace
(HBaseTestingUtil util, String namespace) (package private) static org.apache.hadoop.hbase.client.Table
createTable
(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) (package private) static void
createTableAndPut
(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableNam) (package private) static org.apache.hadoop.hbase.client.TableDescriptor
createUserScanSnapshotDisabledTable
(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) (package private) static PrivilegedExceptionAction<Void>
getScanSnapshotAction
(org.apache.hadoop.conf.Configuration conf, String snapshotName, long expectedRowCount) (package private) static org.apache.hadoop.hbase.client.TableDescriptorBuilder
getTableDescriptorBuilder
(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) (package private) static void
grantOnTable
(HBaseTestingUtil util, String user, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.security.access.Permission.Action... actions) (package private) static void
put
(org.apache.hadoop.hbase.client.Table hTable) (package private) static void
put2
(org.apache.hadoop.hbase.client.Table hTable)
-
Field Details
-
LOG
-
USER_OWNER
- See Also:
-
COLUMN1
-
COLUMN2
-
-
Constructor Details
-
TestHDFSAclHelper
private TestHDFSAclHelper()
-
-
Method Details
-
grantOnTable
static void grantOnTable(HBaseTestingUtil util, String user, org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.security.access.Permission.Action... actions) throws Exception - Throws:
Exception
-
createNamespace
- Throws:
IOException
-
createTable
static org.apache.hadoop.hbase.client.Table createTable(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-
createMobTable
static org.apache.hadoop.hbase.client.Table createMobTable(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-
createUserScanSnapshotDisabledTable
static org.apache.hadoop.hbase.client.TableDescriptor createUserScanSnapshotDisabledTable(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-
getTableDescriptorBuilder
static org.apache.hadoop.hbase.client.TableDescriptorBuilder getTableDescriptorBuilder(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableName) -
createTableAndPut
static void createTableAndPut(HBaseTestingUtil util, org.apache.hadoop.hbase.TableName tableNam) throws Exception - Throws:
Exception
-
put
- Throws:
IOException
-
put2
- Throws:
IOException
-
canUserScanSnapshot
static void canUserScanSnapshot(HBaseTestingUtil util, org.apache.hadoop.hbase.security.User user, String snapshot, int expectedRowCount) throws IOException, InterruptedException Check if user is able to read expected rows from the specific snapshot- Parameters:
user
- the specific usersnapshot
- the snapshot to be scannedexpectedRowCount
- expected row count read from snapshot, -1 if expects AccessControlException- Throws:
IOException
- user scan snapshot errorInterruptedException
- user scan snapshot error
-
getScanSnapshotAction
static PrivilegedExceptionAction<Void> getScanSnapshotAction(org.apache.hadoop.conf.Configuration conf, String snapshotName, long expectedRowCount)
-