Package org.apache.hadoop.hbase.quotas
Class TestQuotaAdmin
java.lang.Object
org.apache.hadoop.hbase.quotas.TestQuotaAdmin
minicluster tests that validate that quota entries are properly set in the quota table
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final org.slf4j.Loggerprivate static final String[]private static final org.apache.hadoop.hbase.TableName[]private static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertNumResults(int expected, org.apache.hadoop.hbase.quotas.QuotaFilter filter) private voidassertRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaScope scope, org.apache.hadoop.hbase.Cell cell) private voidassertRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) private voidassertSpaceQuota(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.Cell cell) private voidassertSpaceQuota(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) voidprivate intcountResults(org.apache.hadoop.hbase.quotas.QuotaFilter filter) intgetQuotaSettingCount(org.apache.hadoop.hbase.client.Admin admin) static voidstatic voidvoidvoidvoidvoidvoidvoidvoidvoidvoidprivate voidtestSetGetRemoveRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType throttleType) voidvoidvoidvoidvoidvoidprivate voidtestSwitchRpcThrottle(org.apache.hadoop.hbase.client.Admin admin, boolean oldRpcThrottle, boolean newRpcThrottle) voidvoidvoidvoidvoidprivate voidverifyFetchableViaAPI(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) private voidverifyNotFetchableViaAPI(org.apache.hadoop.hbase.client.Admin admin) private voidprivate voidverifyRecordPresentInQuotaTable(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) private voidverifyRecordPresentInQuotaTable(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaScope scope)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
TABLE_NAMES
-
NAMESPACES
-
-
Constructor Details
-
TestQuotaAdmin
public TestQuotaAdmin()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
clearQuotaTable
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testThrottleType
- Throws:
Exception
-
testSimpleScan
- Throws:
Exception
-
testMultiQuotaThrottling
- Throws:
Exception
-
testQuotaRetrieverFilter
- Throws:
Exception
-
testSetGetRemoveSpaceQuota
- Throws:
Exception
-
testSetModifyRemoveSpaceQuota
- Throws:
Exception
-
assertNumResults
private void assertNumResults(int expected, org.apache.hadoop.hbase.quotas.QuotaFilter filter) throws Exception - Throws:
Exception
-
testSetGetRemoveRPCQuota
- Throws:
Exception
-
testSetGetRemoveRPCQuota
private void testSetGetRemoveRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType throttleType) throws Exception - Throws:
Exception
-
testSetModifyRemoveRPCQuota
- Throws:
Exception
-
testSetAndRemoveRegionServerQuota
- Throws:
Exception
-
testRpcThrottleWhenStartup
- Throws:
IOExceptionInterruptedException
-
testSwitchRpcThrottle
- Throws:
IOException
-
testSwitchExceedThrottleQuota
- Throws:
IOException
-
testQuotaScope
- Throws:
Exception
-
testSwitchRpcThrottle
private void testSwitchRpcThrottle(org.apache.hadoop.hbase.client.Admin admin, boolean oldRpcThrottle, boolean newRpcThrottle) throws IOException - Throws:
IOException
-
verifyRecordPresentInQuotaTable
private void verifyRecordPresentInQuotaTable(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) throws Exception - Throws:
Exception
-
verifyRecordPresentInQuotaTable
private void verifyRecordPresentInQuotaTable(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaScope scope) throws Exception - Throws:
Exception
-
verifyRecordNotPresentInQuotaTable
- Throws:
Exception
-
verifyFetchableViaAPI
private void verifyFetchableViaAPI(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) throws Exception - Throws:
Exception
-
verifyNotFetchableViaAPI
- Throws:
Exception
-
assertRPCQuota
private void assertRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaScope scope, org.apache.hadoop.hbase.Cell cell) throws Exception - Throws:
Exception
-
assertRPCQuota
private void assertRPCQuota(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) throws Exception - Throws:
Exception
-
assertSpaceQuota
private void assertSpaceQuota(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.Cell cell) throws Exception - Throws:
Exception
-
assertSpaceQuota
private void assertSpaceQuota(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) -
countResults
- Throws:
Exception
-
testUserUnThrottleByType
- Throws:
Exception
-
testUserTableUnThrottleByType
- Throws:
Exception
-
testUserNameSpaceUnThrottleByType
- Throws:
Exception
-
testTableUnThrottleByType
- Throws:
Exception
-
testNameSpaceUnThrottleByType
- Throws:
Exception
-
testRegionServerUnThrottleByType
- Throws:
Exception
-
getQuotaSettingCount
- Throws:
IOException
-
testQuotaTableDisableAndEnable
- Throws:
Exception
-