Package org.apache.hadoop.hbase.quotas
Class TestSuperUserQuotaPermissions
java.lang.Object
org.apache.hadoop.hbase.quotas.TestSuperUserQuotaPermissions
Test class to verify that the HBase superuser can override quotas.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final AtomicLong
private SpaceQuotaHelperForTests
private static final org.slf4j.Logger
private static final String
private static final org.apache.hadoop.security.UserGroupInformation
private static final String
private static final org.apache.hadoop.security.UserGroupInformation
private static final HBaseTestingUtil
org.junit.rules.TestName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate <T> T
doAsRegularUser
(Callable<T> task) private <T> T
doAsSuperUser
(Callable<T> task) private <T> T
private org.apache.hadoop.hbase.client.Connection
void
static void
static void
tearDown()
void
void
private void
waitForHFilesCountLessorEqual
(org.apache.hadoop.hbase.TableName tn, byte[] cf, int count) private void
waitForTableToEnterQuotaViolation
(org.apache.hadoop.hbase.TableName tn)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
SUPERUSER_NAME
-
SUPERUSER_UGI
-
REGULARUSER_NAME
- See Also:
-
REGULARUSER_UGI
-
COUNTER
-
testName
-
helper
-
-
Constructor Details
-
TestSuperUserQuotaPermissions
public TestSuperUserQuotaPermissions()
-
-
Method Details
-
setupMiniCluster
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
removeAllQuotas
- Throws:
Exception
-
testSuperUserCanStillCompact
- Throws:
Exception
-
testSuperuserCanRemoveQuota
- Throws:
Exception
-
getConnection
- Throws:
IOException
-
doAsSuperUser
- Throws:
Exception
-
doAsRegularUser
- Throws:
Exception
-
doAsUser
private <T> T doAsUser(org.apache.hadoop.security.UserGroupInformation ugi, Callable<T> task) throws Exception - Throws:
Exception
-
waitForTableToEnterQuotaViolation
private void waitForTableToEnterQuotaViolation(org.apache.hadoop.hbase.TableName tn) throws Exception - Throws:
Exception
-
waitForHFilesCountLessorEqual
private void waitForHFilesCountLessorEqual(org.apache.hadoop.hbase.TableName tn, byte[] cf, int count) throws Exception - Throws:
Exception
-