1
2
3
4
5
6
7
8
9
10
11
12 package org.apache.hadoop.hbase.quotas;
13
14 import org.apache.hadoop.hbase.classification.InterfaceAudience;
15 import org.apache.hadoop.hbase.classification.InterfaceStability;
16 import org.apache.hadoop.hbase.quotas.OperationQuota.OperationType;
17
18
19
20
21 @InterfaceAudience.Private
22 @InterfaceStability.Evolving
23 final class NoopQuotaLimiter implements QuotaLimiter {
24 private static QuotaLimiter instance = new NoopQuotaLimiter();
25
26 private NoopQuotaLimiter() {
27
28 }
29
30 @Override
31 public void checkQuota(long writeReqs, long estimateWriteSize, long readReqs,
32 long estimateReadSize) throws ThrottlingException {
33
34 }
35
36 @Override
37 public void grabQuota(long writeReqs, long writeSize, long readReqs, long readSize) {
38
39 }
40
41 @Override
42 public void consumeWrite(final long size) {
43
44 }
45
46 @Override
47 public void consumeRead(final long size) {
48
49 }
50
51 @Override
52 public boolean isBypass() {
53 return true;
54 }
55
56 @Override
57 public long getWriteAvailable() {
58 throw new UnsupportedOperationException();
59 }
60
61 @Override
62 public long getReadAvailable() {
63 throw new UnsupportedOperationException();
64 }
65
66 @Override
67 public String toString() {
68 return "NoopQuotaLimiter";
69 }
70
71 public static QuotaLimiter get() {
72 return instance;
73 }
74 }