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
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
private static final String[]
private static final org.apache.hadoop.hbase.TableName[]
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
assertNumResults
(int expected, org.apache.hadoop.hbase.quotas.QuotaFilter filter) 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) private void
assertRPCQuota
(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) private void
assertSpaceQuota
(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.Cell cell) private void
assertSpaceQuota
(long sizeLimit, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy violationPolicy, org.apache.hadoop.hbase.quotas.QuotaSettings actualSettings) void
private int
countResults
(org.apache.hadoop.hbase.quotas.QuotaFilter filter) int
getQuotaSettingCount
(org.apache.hadoop.hbase.client.Admin admin) static void
static void
void
void
void
void
void
void
void
void
void
private void
testSetGetRemoveRPCQuota
(org.apache.hadoop.hbase.quotas.ThrottleType throttleType) void
void
void
void
void
void
private void
testSwitchRpcThrottle
(org.apache.hadoop.hbase.client.Admin admin, boolean oldRpcThrottle, boolean newRpcThrottle) void
void
void
void
void
private void
verifyFetchableViaAPI
(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) private void
verifyNotFetchableViaAPI
(org.apache.hadoop.hbase.client.Admin admin) private void
private void
verifyRecordPresentInQuotaTable
(org.apache.hadoop.hbase.quotas.ThrottleType type, long limit, TimeUnit tu) private void
verifyRecordPresentInQuotaTable
(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:
IOException
InterruptedException
-
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
-