http://git-wip-us.apache.org/repos/asf/hbase/blob/0d76d667/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
--
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
index 8b127d9..973ac8c 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java
@@ -37,9 +37,8 @@ import
org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.master.HMaster;
-import org.apache.hadoop.hbase.quotas.QuotaViolationStore.ViolationState;
-import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
-import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas;
+import org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot;
+import org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot.SpaceQuotaStatus;
import
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota;
import com.google.common.annotations.VisibleForTesting;
@@ -54,51 +53,51 @@ import com.google.common.collect.Multimap;
@InterfaceAudience.Private
public class QuotaObserverChore extends ScheduledChore {
private static final Log LOG = LogFactory.getLog(QuotaObserverChore.class);
- static final String VIOLATION_OBSERVER_CHORE_PERIOD_KEY =
- "hbase.master.quotas.violation.observer.chore.period";
- static final int VIOLATION_OBSERVER_CHORE_PERIOD_DEFAULT = 1000 * 60 * 5; //
5 minutes in millis
+ static final String QUOTA_OBSERVER_CHORE_PERIOD_KEY =
+ "hbase.master.quotas.observer.chore.period";
+ static final int QUOTA_OBSERVER_CHORE_PERIOD_DEFAULT = 1000 * 60 * 5; // 5
minutes in millis
- static final String VIOLATION_OBSERVER_CHORE_DELAY_KEY =
- "hbase.master.quotas.violation.observer.chore.delay";
- static final long VIOLATION_OBSERVER_CHORE_DELAY_DEFAULT = 1000L * 60L; // 1
minute
+ static final String QUOTA_OBSERVER_CHORE_DELAY_KEY =
+ "hbase.master.quotas.observer.chore.delay";
+ static final long QUOTA_OBSERVER_CHORE_DELAY_DEFAULT = 1000L * 60L; // 1
minute
- static final String VIOLATION_OBSERVER_CHORE_TIMEUNIT_KEY =
- "hbase.master.quotas.violation.observer.chore.timeunit";
- static final String VIOLATION_OBSERVER_CHORE_TIMEUNIT_DEFAULT =
TimeUnit.MILLISECONDS.name();
+ static final String QUOTA_OBSERVER_CHORE_TIMEUNIT_KEY =
+ "hbase.master.quotas.observer.chore.timeunit";
+ static final String QUOTA_OBSERVER_CHORE_TIMEUNIT_DEFAULT =
TimeUnit.MILLISECONDS.name();
- static final String VIOLATION_OBSERVER_CHORE_REPORT_PERCENT_KEY =
- "hbase.master.quotas.violation.observer.report.percent";
- static final double VIOLATION_OBSERVER_CHORE_REPORT_PERCENT_DEFAULT= 0.95;
+ static final String QUOTA_OBSERVER_CHORE_REPORT_PERCENT_KEY =
+ "hbase.master.quotas.observer.report.percent";
+ static final double QUOTA_OBSERVER_CHORE_REPORT_PERCENT_DEFAULT= 0.95;
private final Connection conn;
private final Configuration conf;
private final MasterQuotaManager quotaManager;
/*
- * Callback that changes in quota violation are passed to.
+ * Callback that changes in quota snapshots are passed to.
*/
- private final SpaceQuotaViolationNotifier violationNotifier;
+ private final SpaceQuotaSnapshotNotifier snapshotNotifier;
/*
- * Preserves the state of quota violations for tables and namespaces
+ * Preserves the state of quota snapshots for tables and namespaces
*/
- private final Map tableQuotaViolationStates;
- private final Map namespaceQuotaViolationStates;
+ private final Map tableQuotaSnapshots;
+ private final Map namespaceQuotaSnapshots;
/*
- * Encapsulates logic for moving tables/namespaces into or out of quota
violation
+ * Encapsulates logic for tracking the state of a table/namespace WRT space
quotas
*/
- private QuotaViolationStore tableViolationStore;
- private QuotaViolationStore namespaceViolationStore;
+ private QuotaSnapshotStore tableSnapshotStore;
+ private QuotaSnapshotStore namespaceSnapshotStore;
public QuotaObserverChore(HMaster master) {
this(
master.getConnection(), master.getConfiguration(),
-master.getSpaceQuotaViolationNotifier(),
master.getMasterQuotaManager(),
+master.getSpaceQuotaSnapshotNotifier(), master.getMasterQuotaManager(),
master);
}
QuotaObserverChore(
- Connection conn, Configuration conf, SpaceQuotaViolationNotifier
violationNotifier,
+ Connection conn, Configuration conf, SpaceQuotaSnapshotNotifier
snapshotNotifier,