File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 2626import java .util .Queue ;
2727
2828import org .apache .hadoop .conf .Configuration ;
29+ import org .apache .hadoop .hbase .util .Bytes ;
2930import org .apache .yetus .audience .InterfaceAudience ;
3031import org .slf4j .Logger ;
3132import org .slf4j .LoggerFactory ;
@@ -102,6 +103,11 @@ public void close() throws IOException {
102103 public QuotaSettings next () throws IOException {
103104 if (cache .isEmpty ()) {
104105 Result result = scanner .next ();
106+ // Skip exceedThrottleQuota row key because this is not a QuotaSettings
107+ if (result != null
108+ && Bytes .equals (result .getRow (), QuotaTableUtil .getExceedThrottleQuotaRowKey ())) {
109+ result = scanner .next ();
110+ }
105111 if (result == null ) {
106112 return null ;
107113 }
Original file line number Diff line number Diff line change @@ -636,6 +636,7 @@ public void testSwitchExceedThrottleQuota() throws IOException {
636636 assertTrue (admin .exceedThrottleQuotaSwitch (true ));
637637 assertTrue (admin .exceedThrottleQuotaSwitch (false ));
638638 assertFalse (admin .exceedThrottleQuotaSwitch (false ));
639+ assertEquals (2 , admin .getQuota (new QuotaFilter ()).size ());
639640 admin .setQuota (QuotaSettingsFactory .unthrottleRegionServer (regionServer ));
640641 }
641642
You can’t perform that action at this time.
0 commit comments