|
38 | 38 | import org.apache.hadoop.hbase.DoNotRetryIOException; |
39 | 39 | import org.apache.hadoop.hbase.HBaseClassTestRule; |
40 | 40 | import org.apache.hadoop.hbase.HBaseTestingUtility; |
41 | | -import org.apache.hadoop.hbase.NamespaceDescriptor; |
42 | 41 | import org.apache.hadoop.hbase.TableName; |
43 | 42 | import org.apache.hadoop.hbase.TableNotEnabledException; |
44 | 43 | import org.apache.hadoop.hbase.client.Admin; |
@@ -486,52 +485,6 @@ public void testSetQuotaOnNonExistingTableWithDisable() throws Exception { |
486 | 485 | setQuotaLimit(NON_EXISTENT_TABLE, SpaceViolationPolicy.DISABLE, 2L); |
487 | 486 | } |
488 | 487 |
|
489 | | - @Test |
490 | | - public void testSetQuotaWithRegionReplicaSingleRegion() throws Exception { |
491 | | - setQuotaAndVerfiyForRegionReplication(1, 2, SpaceViolationPolicy.NO_INSERTS); |
492 | | - setQuotaAndVerfiyForRegionReplication(1, 2, SpaceViolationPolicy.NO_WRITES); |
493 | | - setQuotaAndVerfiyForRegionReplication(1, 2, SpaceViolationPolicy.NO_WRITES_COMPACTIONS); |
494 | | - setQuotaAndVerfiyForRegionReplication(1, 2, SpaceViolationPolicy.DISABLE); |
495 | | - } |
496 | | - |
497 | | - @Test |
498 | | - public void testSetQuotaWithRegionReplicaMultipleRegion() throws Exception { |
499 | | - setQuotaAndVerfiyForRegionReplication(5, 3, SpaceViolationPolicy.NO_INSERTS); |
500 | | - setQuotaAndVerfiyForRegionReplication(6, 3, SpaceViolationPolicy.NO_WRITES); |
501 | | - setQuotaAndVerfiyForRegionReplication(6, 3, SpaceViolationPolicy.NO_WRITES_COMPACTIONS); |
502 | | - setQuotaAndVerfiyForRegionReplication(6, 3, SpaceViolationPolicy.DISABLE); |
503 | | - } |
504 | | - |
505 | | - @Test |
506 | | - public void testSetQuotaWithSingleRegionZeroRegionReplica() throws Exception { |
507 | | - setQuotaAndVerfiyForRegionReplication(1, 0, SpaceViolationPolicy.NO_INSERTS); |
508 | | - setQuotaAndVerfiyForRegionReplication(1, 0, SpaceViolationPolicy.NO_WRITES); |
509 | | - setQuotaAndVerfiyForRegionReplication(1, 0, SpaceViolationPolicy.NO_WRITES_COMPACTIONS); |
510 | | - setQuotaAndVerfiyForRegionReplication(1, 0, SpaceViolationPolicy.DISABLE); |
511 | | - } |
512 | | - |
513 | | - @Test |
514 | | - public void testSetQuotaWithMultipleRegionZeroRegionReplicas() throws Exception { |
515 | | - setQuotaAndVerfiyForRegionReplication(5, 0, SpaceViolationPolicy.NO_INSERTS); |
516 | | - setQuotaAndVerfiyForRegionReplication(6, 0, SpaceViolationPolicy.NO_WRITES); |
517 | | - setQuotaAndVerfiyForRegionReplication(6, 0, SpaceViolationPolicy.NO_WRITES_COMPACTIONS); |
518 | | - setQuotaAndVerfiyForRegionReplication(6, 0, SpaceViolationPolicy.DISABLE); |
519 | | - } |
520 | | - |
521 | | - private void setQuotaAndVerfiyForRegionReplication(int region, int replicatedRegion, |
522 | | - SpaceViolationPolicy policy) throws Exception { |
523 | | - TableName tn = helper.createTableWithRegions(TEST_UTIL.getAdmin(), |
524 | | - NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR, region, replicatedRegion); |
525 | | - setQuotaLimit(tn, policy, 5L); |
526 | | - helper.writeData(tn, 5L * SpaceQuotaHelperForTests.ONE_MEGABYTE); |
527 | | - Put p = new Put(Bytes.toBytes("to_reject")); |
528 | | - p.addColumn(Bytes.toBytes(SpaceQuotaHelperForTests.F1), Bytes.toBytes("to"), |
529 | | - Bytes.toBytes("reject")); |
530 | | - // Adding a sleep for 5 sec, so all the chores run and to void flakiness of the test. |
531 | | - Thread.sleep(5000); |
532 | | - verifyViolation(policy, tn, p); |
533 | | - } |
534 | | - |
535 | 488 | public void setQuotaAndViolateNextSwitchPoliciesAndValidate(SpaceViolationPolicy policy1, |
536 | 489 | SpaceViolationPolicy policy2) throws Exception { |
537 | 490 | Put put = new Put(Bytes.toBytes("to_reject")); |
|
0 commit comments