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 / SpaceQuotaSnapshotNotifier.java
blobf056647bfc61198f6c554b67741b6ae059a85903
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.io.IOException;
21 import org.apache.hadoop.hbase.TableName;
22 import org.apache.yetus.audience.InterfaceAudience;
23 import org.apache.hadoop.hbase.client.Connection;
25 /**
26 * An interface which abstract away the action taken to enable or disable
27 * a space quota violation policy across the HBase cluster. Implementations
28 * must have a no-args constructor.
30 @InterfaceAudience.Private
31 public interface SpaceQuotaSnapshotNotifier {
33 /**
34 * Initializes the notifier.
36 void initialize(Connection conn);
38 /**
39 * Informs the cluster of the current state of a space quota for a table.
41 * @param tableName The name of the table.
42 * @param snapshot The details of the space quota utilization.
44 void transitionTable(TableName tableName, SpaceQuotaSnapshot snapshot) throws IOException;