1
2
3
4
5
6
7
8
9
10
11
12 package org.apache.hadoop.hbase.quotas;
13
14 import static org.junit.Assert.assertEquals;
15
16 import java.util.concurrent.TimeUnit;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.apache.hadoop.hbase.HBaseTestingUtility;
21 import org.apache.hadoop.hbase.HConstants;
22 import org.apache.hadoop.hbase.TableName;
23 import org.apache.hadoop.hbase.client.Admin;
24 import org.apache.hadoop.hbase.client.Get;
25 import org.apache.hadoop.hbase.client.HTable;
26 import org.apache.hadoop.hbase.client.Put;
27 import org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException;
28 import org.apache.hadoop.hbase.client.Table;
29 import org.apache.hadoop.hbase.security.User;
30 import org.apache.hadoop.hbase.testclassification.MediumTests;
31 import org.apache.hadoop.hbase.util.Bytes;
32 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
33 import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
34 import org.apache.hadoop.hbase.util.IncrementingEnvironmentEdge;
35 import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;
36 import org.junit.After;
37 import org.junit.AfterClass;
38 import org.junit.BeforeClass;
39 import org.junit.Test;
40 import org.junit.experimental.categories.Category;
41
42 @Category({ MediumTests.class })
43 public class TestQuotaThrottle {
44 final Log LOG = LogFactory.getLog(getClass());
45
46 private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
47
48 private final static byte[] FAMILY = Bytes.toBytes("cf");
49 private final static byte[] QUALIFIER = Bytes.toBytes("q");
50
51 private final static TableName[] TABLE_NAMES = new TableName[] {
52 TableName.valueOf("TestQuotaAdmin0"), TableName.valueOf("TestQuotaAdmin1"),
53 TableName.valueOf("TestQuotaAdmin2") };
54
55 private static HTable[] tables;
56
57 @BeforeClass
58 public static void setUpBeforeClass() throws Exception {
59 TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true);
60 TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 10);
61 TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100);
62 TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250);
63 TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
64 TEST_UTIL.getConfiguration().setBoolean("hbase.master.enabletable.roundrobin", true);
65 TEST_UTIL.startMiniCluster(1);
66 TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME);
67 QuotaCache.setTEST_FORCE_REFRESH(true);
68
69 tables = new HTable[TABLE_NAMES.length];
70 for (int i = 0; i < TABLE_NAMES.length; ++i) {
71 tables[i] = TEST_UTIL.createTable(TABLE_NAMES[i], FAMILY);
72 }
73 }
74
75 @AfterClass
76 public static void tearDownAfterClass() throws Exception {
77 for (int i = 0; i < tables.length; ++i) {
78 if (tables[i] != null) {
79 tables[i].close();
80 TEST_UTIL.deleteTable(TABLE_NAMES[i]);
81 }
82 }
83
84 TEST_UTIL.shutdownMiniCluster();
85 }
86
87 @After
88 public void tearDown() throws Exception {
89 for (RegionServerThread rst : TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads()) {
90 RegionServerQuotaManager quotaManager = rst.getRegionServer().getRegionServerQuotaManager();
91 QuotaCache quotaCache = quotaManager.getQuotaCache();
92 quotaCache.getNamespaceQuotaCache().clear();
93 quotaCache.getTableQuotaCache().clear();
94 quotaCache.getUserQuotaCache().clear();
95 }
96 }
97
98 @Test(timeout = 60000)
99 public void testUserGlobalThrottle() throws Exception {
100 final Admin admin = TEST_UTIL.getHBaseAdmin();
101 final String userName = User.getCurrent().getShortName();
102
103
104 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, ThrottleType.REQUEST_NUMBER, 6,
105 TimeUnit.MINUTES));
106 triggerUserCacheRefresh(false, TABLE_NAMES);
107
108
109 assertEquals(6, doPuts(100, tables));
110
111
112 waitMinuteQuota();
113 assertEquals(6, doPuts(100, tables));
114
115
116 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName));
117 triggerUserCacheRefresh(true, TABLE_NAMES);
118 assertEquals(60, doPuts(60, tables));
119 assertEquals(60, doGets(60, tables));
120 }
121
122 @Test(timeout=60000)
123 public void testUserGlobalReadAndWriteThrottle() throws Exception {
124 final Admin admin = TEST_UTIL.getHBaseAdmin();
125 final String userName = User.getCurrent().getShortName();
126
127
128 admin.setQuota(QuotaSettingsFactory
129 .throttleUser(userName, ThrottleType.READ_NUMBER, 6, TimeUnit.MINUTES));
130 triggerUserCacheRefresh(false, TABLE_NAMES);
131
132
133 assertEquals(60, doPuts(60, tables));
134 assertEquals(6, doGets(100, tables));
135
136 waitMinuteQuota();
137
138
139 admin.setQuota(QuotaSettingsFactory
140 .throttleUser(userName, ThrottleType.WRITE_NUMBER, 6, TimeUnit.MINUTES));
141 triggerUserCacheRefresh(false, TABLE_NAMES);
142
143
144 assertEquals(6, doGets(100, tables));
145 assertEquals(6, doPuts(60, tables));
146
147
148 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName));
149 triggerUserCacheRefresh(true, TABLE_NAMES);
150 assertEquals(60, doPuts(60, tables));
151 assertEquals(60, doGets(60, tables));
152 }
153
154 @Test(timeout = 60000)
155 public void testUserTableThrottle() throws Exception {
156 final Admin admin = TEST_UTIL.getHBaseAdmin();
157 final String userName = User.getCurrent().getShortName();
158
159
160 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, TABLE_NAMES[0],
161 ThrottleType.REQUEST_NUMBER, 6, TimeUnit.MINUTES));
162 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
163
164
165 assertEquals(6, doPuts(100, tables[0]));
166 assertEquals(30, doPuts(30, tables[1]));
167
168
169 waitMinuteQuota();
170 assertEquals(6, doPuts(100, tables[0]));
171
172
173 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, TABLE_NAMES[0]));
174 triggerUserCacheRefresh(true, TABLE_NAMES);
175 assertEquals(60, doPuts(60, tables));
176 assertEquals(60, doGets(60, tables));
177 }
178
179 @Test(timeout=60000)
180 public void testUserTableReadAndWriteThrottle() throws Exception {
181 final Admin admin = TEST_UTIL.getHBaseAdmin();
182 final String userName = User.getCurrent().getShortName();
183
184
185 admin.setQuota(QuotaSettingsFactory
186 .throttleUser(userName, TABLE_NAMES[0], ThrottleType.WRITE_NUMBER, 6, TimeUnit.MINUTES));
187 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
188
189
190 assertEquals(6, doPuts(100, tables[0]));
191 assertEquals(60, doGets(60, tables[0]));
192
193
194 assertEquals(60, doPuts(60, tables[1]));
195 assertEquals(60, doGets(60, tables[1]));
196
197
198 waitMinuteQuota();
199
200
201 admin.setQuota(QuotaSettingsFactory
202 .throttleUser(userName, TABLE_NAMES[0], ThrottleType.READ_NUMBER, 6, TimeUnit.MINUTES));
203 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
204
205
206 assertEquals(6, doPuts(100, tables[0]));
207 assertEquals(6, doGets(60, tables[0]));
208
209
210 assertEquals(30, doPuts(30, tables[1]));
211 assertEquals(30, doGets(30, tables[1]));
212
213
214 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, TABLE_NAMES[0]));
215 triggerUserCacheRefresh(true, TABLE_NAMES);
216 assertEquals(60, doPuts(60, tables));
217 assertEquals(60, doGets(60, tables));
218 }
219
220 @Test(timeout = 60000)
221 public void testUserNamespaceThrottle() throws Exception {
222 final Admin admin = TEST_UTIL.getHBaseAdmin();
223 final String userName = User.getCurrent().getShortName();
224 final String NAMESPACE = "default";
225
226
227 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, NAMESPACE,
228 ThrottleType.REQUEST_NUMBER, 6, TimeUnit.MINUTES));
229 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
230
231
232 assertEquals(6, doPuts(100, tables[0]));
233
234
235 waitMinuteQuota();
236 assertEquals(6, doPuts(100, tables[1]));
237
238
239 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, NAMESPACE));
240 triggerUserCacheRefresh(true, TABLE_NAMES);
241 assertEquals(60, doPuts(60, tables));
242 assertEquals(60, doGets(60, tables));
243 }
244
245 @Test(timeout=60000)
246 public void testUserNamespaceReadAndWriteThrottle() throws Exception {
247 final Admin admin = TEST_UTIL.getHBaseAdmin();
248 final String userName = User.getCurrent().getShortName();
249 final String NAMESPACE = "default";
250
251
252 admin.setQuota(QuotaSettingsFactory
253 .throttleUser(userName, NAMESPACE, ThrottleType.READ_NUMBER, 6, TimeUnit.MINUTES));
254 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
255
256
257 assertEquals(6, doGets(60, tables[0]));
258 assertEquals(60, doPuts(60, tables[0]));
259
260 waitMinuteQuota();
261
262
263 admin.setQuota(QuotaSettingsFactory
264 .throttleUser(userName, NAMESPACE, ThrottleType.WRITE_NUMBER, 6, TimeUnit.MINUTES));
265 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
266
267
268 assertEquals(6, doGets(60, tables[0]));
269 assertEquals(6, doPuts(60, tables[0]));
270
271
272 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, NAMESPACE));
273 triggerUserCacheRefresh(true, TABLE_NAMES);
274 assertEquals(60, doPuts(60, tables));
275 assertEquals(60, doGets(60, tables));
276 }
277
278 @Test(timeout = 60000)
279 public void testTableGlobalThrottle() throws Exception {
280 final Admin admin = TEST_UTIL.getHBaseAdmin();
281
282
283 admin.setQuota(QuotaSettingsFactory.throttleTable(TABLE_NAMES[0], ThrottleType.REQUEST_NUMBER,
284 6, TimeUnit.MINUTES));
285 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
286
287
288 assertEquals(6, doPuts(100, tables[0]));
289
290 assertEquals(30, doPuts(30, tables[1]));
291
292
293 waitMinuteQuota();
294 assertEquals(6, doPuts(100, tables[0]));
295
296
297 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
298 triggerTableCacheRefresh(true, TABLE_NAMES[0]);
299 assertEquals(80, doGets(80, tables[0], tables[1]));
300 }
301
302 @Test(timeout=60000)
303 public void testTableGlobalReadAndWriteThrottle() throws Exception {
304 final Admin admin = TEST_UTIL.getHBaseAdmin();
305
306
307 admin.setQuota(QuotaSettingsFactory
308 .throttleTable(TABLE_NAMES[0], ThrottleType.READ_NUMBER, 6, TimeUnit.MINUTES));
309 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
310
311
312 assertEquals(6, doGets(100, tables[0]));
313 assertEquals(100, doPuts(100, tables[0]));
314
315 assertEquals(30, doPuts(30, tables[1]));
316 assertEquals(30, doGets(30, tables[1]));
317
318
319 waitMinuteQuota();
320
321
322 admin.setQuota(QuotaSettingsFactory
323 .throttleTable(TABLE_NAMES[0], ThrottleType.WRITE_NUMBER, 6, TimeUnit.MINUTES));
324 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
325
326
327 assertEquals(6, doGets(100, tables[0]));
328 assertEquals(6, doPuts(100, tables[0]));
329
330 assertEquals(30, doPuts(30, tables[1]));
331 assertEquals(30, doGets(30, tables[1]));
332
333
334 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
335 triggerTableCacheRefresh(true, TABLE_NAMES[0]);
336 assertEquals(80, doGets(80, tables[0], tables[1]));
337 }
338
339 @Test(timeout = 60000)
340 public void testNamespaceGlobalThrottle() throws Exception {
341 final Admin admin = TEST_UTIL.getHBaseAdmin();
342 final String NAMESPACE = "default";
343
344
345 admin.setQuota(QuotaSettingsFactory.throttleNamespace(NAMESPACE, ThrottleType.REQUEST_NUMBER,
346 6, TimeUnit.MINUTES));
347 triggerNamespaceCacheRefresh(false, TABLE_NAMES[0]);
348
349
350 assertEquals(6, doPuts(100, tables[0]));
351
352
353 waitMinuteQuota();
354 assertEquals(6, doPuts(100, tables[1]));
355
356 admin.setQuota(QuotaSettingsFactory.unthrottleNamespace(NAMESPACE));
357 triggerNamespaceCacheRefresh(true, TABLE_NAMES[0]);
358 assertEquals(40, doPuts(40, tables[0]));
359 }
360
361 @Test(timeout=60000)
362 public void testNamespaceGlobalReadAndWriteThrottle() throws Exception {
363 final Admin admin = TEST_UTIL.getHBaseAdmin();
364 final String NAMESPACE = "default";
365
366
367 admin.setQuota(QuotaSettingsFactory
368 .throttleNamespace(NAMESPACE, ThrottleType.WRITE_NUMBER, 6, TimeUnit.MINUTES));
369 triggerNamespaceCacheRefresh(false, TABLE_NAMES[0]);
370
371
372 assertEquals(6, doPuts(100, tables[0]));
373 assertEquals(100, doGets(100, tables[0]));
374
375
376 waitMinuteQuota();
377
378
379 admin.setQuota(QuotaSettingsFactory
380 .throttleNamespace(NAMESPACE, ThrottleType.READ_NUMBER, 6, TimeUnit.MINUTES));
381 triggerNamespaceCacheRefresh(false, TABLE_NAMES[0]);
382
383
384 assertEquals(6, doPuts(100, tables[0]));
385 assertEquals(6, doGets(100, tables[0]));
386
387 admin.setQuota(QuotaSettingsFactory.unthrottleNamespace(NAMESPACE));
388 triggerNamespaceCacheRefresh(true, TABLE_NAMES[0]);
389 assertEquals(40, doPuts(40, tables[0]));
390 }
391
392 @Test(timeout = 60000)
393 public void testUserAndTableThrottle() throws Exception {
394 final Admin admin = TEST_UTIL.getHBaseAdmin();
395 final String userName = User.getCurrent().getShortName();
396
397
398 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, TABLE_NAMES[0],
399 ThrottleType.REQUEST_NUMBER, 6, TimeUnit.MINUTES));
400 triggerUserCacheRefresh(false, TABLE_NAMES[0]);
401
402 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, ThrottleType.REQUEST_NUMBER, 12,
403 TimeUnit.MINUTES));
404 triggerUserCacheRefresh(false, TABLE_NAMES[1], TABLE_NAMES[2]);
405
406 admin.setQuota(QuotaSettingsFactory.throttleTable(TABLE_NAMES[1], ThrottleType.REQUEST_NUMBER,
407 8, TimeUnit.MINUTES));
408 triggerTableCacheRefresh(false, TABLE_NAMES[1]);
409
410 admin.setQuota(QuotaSettingsFactory.throttleTable(TABLE_NAMES[0], ThrottleType.REQUEST_NUMBER,
411 3, TimeUnit.MINUTES));
412 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
413
414
415 assertEquals(12, doGets(100, tables[2]));
416
417
418 waitMinuteQuota();
419 assertEquals(8, doGets(100, tables[1]));
420
421
422 waitMinuteQuota();
423 assertEquals(3, doPuts(100, tables[0]));
424
425
426 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, TABLE_NAMES[0]));
427 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName));
428 triggerUserCacheRefresh(true, TABLE_NAMES[0], TABLE_NAMES[1]);
429
430 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[1]));
431 triggerTableCacheRefresh(true, TABLE_NAMES[1]);
432 waitMinuteQuota();
433 assertEquals(40, doGets(40, tables[1]));
434
435 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
436 triggerTableCacheRefresh(true, TABLE_NAMES[0]);
437 waitMinuteQuota();
438 assertEquals(40, doGets(40, tables[0]));
439 }
440
441 @Test(timeout = 60000)
442 public void testUserGlobalBypassThrottle() throws Exception {
443 final Admin admin = TEST_UTIL.getHBaseAdmin();
444 final String userName = User.getCurrent().getShortName();
445 final String NAMESPACE = "default";
446
447
448 admin.setQuota(QuotaSettingsFactory.throttleTable(TABLE_NAMES[0], ThrottleType.REQUEST_NUMBER,
449 6, TimeUnit.MINUTES));
450 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
451
452 admin.setQuota(QuotaSettingsFactory.throttleNamespace(NAMESPACE, ThrottleType.REQUEST_NUMBER,
453 13, TimeUnit.MINUTES));
454 triggerNamespaceCacheRefresh(false, TABLE_NAMES[1]);
455
456
457 assertEquals(6, doPuts(100, tables[0]));
458 assertEquals(7, doGets(100, tables[1]));
459 waitMinuteQuota();
460
461
462 admin.setQuota(QuotaSettingsFactory.bypassGlobals(userName, true));
463 admin.setQuota(QuotaSettingsFactory.throttleUser(userName, TABLE_NAMES[2],
464 ThrottleType.REQUEST_NUMBER, 6, TimeUnit.MINUTES));
465 triggerUserCacheRefresh(false, TABLE_NAMES[2]);
466 assertEquals(30, doGets(30, tables[0]));
467 assertEquals(30, doGets(30, tables[1]));
468 waitMinuteQuota();
469
470
471
472 admin.setQuota(QuotaSettingsFactory.bypassGlobals(userName, false));
473 admin.setQuota(QuotaSettingsFactory.unthrottleUser(userName, TABLE_NAMES[2]));
474 triggerUserCacheRefresh(true, TABLE_NAMES[2]);
475 assertEquals(6, doPuts(100, tables[0]));
476 assertEquals(7, doGets(100, tables[1]));
477
478
479 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
480 admin.setQuota(QuotaSettingsFactory.unthrottleNamespace(NAMESPACE));
481 waitMinuteQuota();
482 triggerTableCacheRefresh(true, TABLE_NAMES[0]);
483 triggerNamespaceCacheRefresh(true, TABLE_NAMES[1]);
484 assertEquals(30, doGets(30, tables[0]));
485 assertEquals(30, doGets(30, tables[1]));
486 }
487
488 @Test
489 public void testTableExistsGetThrottle() throws Exception {
490 final Admin admin = TEST_UTIL.getHBaseAdmin();
491
492
493 admin.setQuota(QuotaSettingsFactory.throttleTable(TABLE_NAMES[0],
494 ThrottleType.REQUEST_NUMBER, 100, TimeUnit.MINUTES));
495 triggerTableCacheRefresh(false, TABLE_NAMES[0]);
496
497 Table table = TEST_UTIL.getConnection().getTable(TABLE_NAMES[0]);
498
499 table.exists(new Get(Bytes.toBytes("abc")));
500
501 admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
502 triggerTableCacheRefresh(true, TABLE_NAMES[0]);
503 }
504
505 private int doPuts(int maxOps, final HTable... tables) throws Exception {
506 int count = 0;
507 try {
508 while (count < maxOps) {
509 Put put = new Put(Bytes.toBytes("row-" + count));
510 put.addColumn(FAMILY, QUALIFIER, Bytes.toBytes("data-" + count));
511 for (final HTable table : tables) {
512 table.put(put);
513 }
514 count += tables.length;
515 }
516 } catch (RetriesExhaustedWithDetailsException e) {
517 for (Throwable t : e.getCauses()) {
518 if (!(t instanceof ThrottlingException)) {
519 throw e;
520 }
521 }
522 LOG.error("put failed after nRetries=" + count, e);
523 }
524 return count;
525 }
526
527 private long doGets(int maxOps, final HTable... tables) throws Exception {
528 int count = 0;
529 try {
530 while (count < maxOps) {
531 Get get = new Get(Bytes.toBytes("row-" + count));
532 for (final HTable table : tables) {
533 table.get(get);
534 }
535 count += tables.length;
536 }
537 } catch (ThrottlingException e) {
538 LOG.error("get failed after nRetries=" + count, e);
539 }
540 return count;
541 }
542
543 private void triggerUserCacheRefresh(boolean bypass, TableName... tables) throws Exception {
544 triggerCacheRefresh(bypass, true, false, false, tables);
545 }
546
547 private void triggerTableCacheRefresh(boolean bypass, TableName... tables) throws Exception {
548 triggerCacheRefresh(bypass, false, true, false, tables);
549 }
550
551 private void triggerNamespaceCacheRefresh(boolean bypass, TableName... tables) throws Exception {
552 triggerCacheRefresh(bypass, false, false, true, tables);
553 }
554
555 private void triggerCacheRefresh(boolean bypass, boolean userLimiter, boolean tableLimiter,
556 boolean nsLimiter, final TableName... tables) throws Exception {
557 for (RegionServerThread rst : TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads()) {
558 RegionServerQuotaManager quotaManager = rst.getRegionServer().getRegionServerQuotaManager();
559 QuotaCache quotaCache = quotaManager.getQuotaCache();
560
561 quotaCache.triggerCacheRefresh();
562 Thread.sleep(250);
563
564 for (TableName table : tables) {
565 quotaCache.getTableLimiter(table);
566 }
567
568 boolean isUpdated = false;
569 while (!isUpdated) {
570 isUpdated = true;
571 for (TableName table : tables) {
572 boolean isBypass = true;
573 if (userLimiter) {
574 isBypass &= quotaCache.getUserLimiter(User.getCurrent().getUGI(), table).isBypass();
575 }
576 if (tableLimiter) {
577 isBypass &= quotaCache.getTableLimiter(table).isBypass();
578 }
579 if (nsLimiter) {
580 isBypass &= quotaCache.getNamespaceLimiter(table.getNamespaceAsString()).isBypass();
581 }
582 if (isBypass != bypass) {
583 isUpdated = false;
584 Thread.sleep(250);
585 break;
586 }
587 }
588 }
589
590 LOG.debug("QuotaCache");
591 LOG.debug(quotaCache.getNamespaceQuotaCache());
592 LOG.debug(quotaCache.getTableQuotaCache());
593 LOG.debug(quotaCache.getUserQuotaCache());
594 }
595 }
596
597 private void waitMinuteQuota() {
598 EnvironmentEdgeManagerTestHelper.injectEdge(new IncrementingEnvironmentEdge(
599 EnvironmentEdgeManager.currentTime() + 70000));
600 }
601 }