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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final AtomicLongprivate SpaceQuotaHelperForTestsprivate static final org.slf4j.Loggerprivate static final Stringprivate static final org.apache.hadoop.security.UserGroupInformationprivate static final Stringprivate static final org.apache.hadoop.security.UserGroupInformationprivate static final HBaseTestingUtilorg.junit.rules.TestName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> TdoAsRegularUser(Callable<T> task) private <T> TdoAsSuperUser(Callable<T> task) private <T> Tprivate org.apache.hadoop.hbase.client.Connectionvoidstatic voidstatic voidtearDown()voidvoidprivate voidwaitForHFilesCountLessorEqual(org.apache.hadoop.hbase.TableName tn, byte[] cf, int count) private voidwaitForTableToEnterQuotaViolation(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
-