HBASE-17794 Swap "violation" for "snapshot" where appropriate
A couple of variables and comments in which violation is incorrectly used to describe what the code is doing. This was a hold over from early implementation -- need to scrub these out for clarity.
This commit is contained in:
parent
f7da41d0bf
commit
a8460b8bad
|
@ -228,7 +228,7 @@ public class QuotaTableUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a {@link Scan} which returns only quota violations from the quota table.
|
||||
* Creates a {@link Scan} which returns only quota snapshots from the quota table.
|
||||
*/
|
||||
public static Scan makeQuotaSnapshotScan() {
|
||||
Scan s = new Scan();
|
||||
|
@ -246,7 +246,7 @@ public class QuotaTableUtil {
|
|||
* will throw an {@link IllegalArgumentException}.
|
||||
*
|
||||
* @param result A row from the quota table.
|
||||
* @param snapshots A map of violations to add the result of this method into.
|
||||
* @param snapshots A map of snapshots to add the result of this method into.
|
||||
*/
|
||||
public static void extractQuotaSnapshot(
|
||||
Result result, Map<TableName,SpaceQuotaSnapshot> snapshots) {
|
||||
|
|
|
@ -98,7 +98,7 @@ message SpaceLimitRequest {
|
|||
}
|
||||
|
||||
// Represents the state of a quota on a table. Either the quota is not in violation
|
||||
// or it is in violatino there is a violation policy which should be in effect.
|
||||
// or it is in violation there is a violation policy which should be in effect.
|
||||
message SpaceQuotaStatus {
|
||||
optional SpaceViolationPolicy policy = 1;
|
||||
optional bool in_violation = 2;
|
||||
|
|
|
@ -532,9 +532,9 @@ public class QuotaObserverChore extends ScheduledChore {
|
|||
}
|
||||
|
||||
/**
|
||||
* Stores the quota violation state for the given table.
|
||||
* Stores the quota state for the given table.
|
||||
*/
|
||||
void setTableQuotaViolation(TableName table, SpaceQuotaSnapshot snapshot) {
|
||||
void setTableQuotaSnapshot(TableName table, SpaceQuotaSnapshot snapshot) {
|
||||
this.tableQuotaSnapshots.put(table, snapshot);
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,7 @@ public class QuotaObserverChore extends ScheduledChore {
|
|||
}
|
||||
|
||||
/**
|
||||
* Stores the quota violation state for the given namespace.
|
||||
* Stores the quota state for the given namespace.
|
||||
*/
|
||||
void setNamespaceQuotaSnapshot(String namespace, SpaceQuotaSnapshot snapshot) {
|
||||
this.namespaceQuotaSnapshots.put(namespace, snapshot);
|
||||
|
|
|
@ -112,7 +112,7 @@ public class TableQuotaSnapshotStore implements QuotaSnapshotStore<TableName> {
|
|||
@Override
|
||||
public void setCurrentState(TableName table, SpaceQuotaSnapshot snapshot) {
|
||||
// Defer the "current state" to the chore
|
||||
this.chore.setTableQuotaViolation(table, snapshot);
|
||||
this.chore.setTableQuotaSnapshot(table, snapshot);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue