@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class AbstractViolationPolicyEnforcement extends Object implements SpaceViolationPolicyEnforcement
SpaceViolationPolicyEnforcement
.Modifier and Type | Field and Description |
---|---|
(package private) SpaceQuotaSnapshot |
quotaSnapshot |
(package private) RegionServerServices |
rss |
(package private) TableName |
tableName |
Constructor and Description |
---|
AbstractViolationPolicyEnforcement() |
Modifier and Type | Method and Description |
---|---|
boolean |
areCompactionsDisabled()
Returns whether or not compactions on this table should be disabled for this policy.
|
(package private) long |
getFileSize(org.apache.hadoop.fs.FileSystem fs,
String path)
Computes the size of a single file on the filesystem.
|
SpaceQuotaSnapshot |
getQuotaSnapshot()
Returns the
SpaceQuotaSnapshot this was initialized with. |
RegionServerServices |
getRegionServerServices() |
TableName |
getTableName() |
void |
initialize(RegionServerServices rss,
TableName tableName,
SpaceQuotaSnapshot snapshot)
Initializes this policy instance.
|
void |
setQuotaSnapshot(SpaceQuotaSnapshot snapshot) |
void |
setRegionServerServices(RegionServerServices rss) |
void |
setTableName(TableName tableName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
check, computeBulkLoadSize, disable, enable, getPolicyName, shouldCheckBulkLoads
SpaceQuotaSnapshot quotaSnapshot
public AbstractViolationPolicyEnforcement()
public void setRegionServerServices(RegionServerServices rss)
public void setTableName(TableName tableName)
public RegionServerServices getRegionServerServices()
public TableName getTableName()
public void setQuotaSnapshot(SpaceQuotaSnapshot snapshot)
public SpaceQuotaSnapshot getQuotaSnapshot()
SpaceViolationPolicyEnforcement
SpaceQuotaSnapshot
this
was initialized with.getQuotaSnapshot
in interface SpaceViolationPolicyEnforcement
public void initialize(RegionServerServices rss, TableName tableName, SpaceQuotaSnapshot snapshot)
SpaceViolationPolicyEnforcement
initialize
in interface SpaceViolationPolicyEnforcement
public boolean areCompactionsDisabled()
SpaceViolationPolicyEnforcement
areCompactionsDisabled
in interface SpaceViolationPolicyEnforcement
long getFileSize(org.apache.hadoop.fs.FileSystem fs, String path) throws SpaceLimitingException
SpaceLimitingException
is thrown, as the file may violate a quota. If the
provided path does not reference a file, an IllegalArgumentException
is thrown.fs
- The FileSystem which the path refers to a file uponpath
- The path on the fs
to a file whose size is being checkedSpaceLimitingException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.