HBASE-26286: Add support for specifying store file tracker when restoring or cloning...
[hbase.git] / hbase-server / src / main / java / org / apache / hadoop / hbase / quotas / GlobalQuotaSettings.java
blobb722e84bbc6b932591bb011c529ca9f1dbb0130b
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to you under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package org.apache.hadoop.hbase.quotas;
19 import java.util.List;
21 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
22 import org.apache.hadoop.hbase.TableName;
23 import org.apache.yetus.audience.InterfaceAudience;
24 import org.apache.yetus.audience.InterfaceStability;
26 import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder;
27 import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas;
29 /**
30 * An object which captures all quotas types (throttle or space) for a subject (user, table, or
31 * namespace). This is used inside of the HBase RegionServer to act as an analogy to the
32 * ProtocolBuffer class {@link Quotas}.
34 @InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.COPROC})
35 @InterfaceStability.Evolving
36 public abstract class GlobalQuotaSettings extends QuotaSettings {
38 protected GlobalQuotaSettings(String userName, TableName tableName, String namespace,
39 String regionServer) {
40 super(userName, tableName, namespace, regionServer);
43 /**
44 * Computes a list of QuotaSettings that present the complete quota state of the combination of
45 * this user, table, and/or namespace. Beware in calling this method repeatedly as the
46 * implementation of it may be costly.
48 public abstract List<QuotaSettings> getQuotaSettings();
50 @Override
51 public QuotaType getQuotaType() {
52 throw new UnsupportedOperationException();
55 @Override
56 protected void setupSetQuotaRequest(Builder builder) {
57 // ThrottleSettings should be used instead for setting a throttle quota.
58 throw new UnsupportedOperationException(
59 "This class should not be used to generate a SetQuotaRequest.");