@InterfaceAudience.Private @InterfaceStability.Evolving public class ActivePolicyEnforcement extends Object
locallyCachedPolicies
.
The locallyCachedPolicies
are mutable given the current activePolicies
and snapshots
. It is expected that when a new instance of this class is
instantiated, we also want to invalidate those previously cached policies (as they
may now be invalidate if we received new quota usage information).Constructor and Description |
---|
ActivePolicyEnforcement(Map<TableName,SpaceViolationPolicyEnforcement> activePolicies,
Map<TableName,SpaceQuotaSnapshot> snapshots,
RegionServerServices rss) |
ActivePolicyEnforcement(Map<TableName,SpaceViolationPolicyEnforcement> activePolicies,
Map<TableName,SpaceQuotaSnapshot> snapshots,
RegionServerServices rss,
SpaceViolationPolicyEnforcementFactory factory) |
Modifier and Type | Method and Description |
---|---|
Map<TableName,SpaceViolationPolicyEnforcement> |
getPolicies()
Returns an unmodifiable version of the active
SpaceViolationPolicyEnforcement s. |
SpaceViolationPolicyEnforcement |
getPolicyEnforcement(Region r)
Returns the proper
SpaceViolationPolicyEnforcement implementation for the given table. |
SpaceViolationPolicyEnforcement |
getPolicyEnforcement(TableName tableName)
Returns the proper
SpaceViolationPolicyEnforcement implementation for the given table. |
String |
toString() |
public ActivePolicyEnforcement(Map<TableName,SpaceViolationPolicyEnforcement> activePolicies, Map<TableName,SpaceQuotaSnapshot> snapshots, RegionServerServices rss)
public ActivePolicyEnforcement(Map<TableName,SpaceViolationPolicyEnforcement> activePolicies, Map<TableName,SpaceQuotaSnapshot> snapshots, RegionServerServices rss, SpaceViolationPolicyEnforcementFactory factory)
public SpaceViolationPolicyEnforcement getPolicyEnforcement(Region r)
SpaceViolationPolicyEnforcement
implementation for the given table.
If the given table does not have a violation policy enforced, a "no-op" policy will
be returned which always allows an action.getPolicyEnforcement(TableName)
public SpaceViolationPolicyEnforcement getPolicyEnforcement(TableName tableName)
SpaceViolationPolicyEnforcement
implementation for the given table.
If the given table does not have a violation policy enforced, a "no-op" policy will
be returned which always allows an action.tableName
- The table to fetch the policy for.SpaceViolationPolicyEnforcement
instance.public Map<TableName,SpaceViolationPolicyEnforcement> getPolicies()
SpaceViolationPolicyEnforcement
s.Copyright © 2007–2019 Cloudera. All rights reserved.