@InterfaceAudience.Private @InterfaceStability.Evolving class SpaceLimitSettings extends QuotaSettings
QuotaSettings implementation for configuring filesystem-use quotas.| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest |
proto |
| Constructor and Description |
|---|
SpaceLimitSettings(String namespace)
Constructs a
SpaceLimitSettings to remove a space quota on the given namespace. |
SpaceLimitSettings(String namespace,
long sizeLimit,
SpaceViolationPolicy violationPolicy) |
SpaceLimitSettings(TableName tableName)
Constructs a
SpaceLimitSettings to remove a space quota on the given tableName. |
SpaceLimitSettings(TableName tableName,
long sizeLimit,
SpaceViolationPolicy violationPolicy) |
SpaceLimitSettings(TableName tableName,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest req) |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest |
buildProtoAddQuota(long sizeLimit,
SpaceViolationPolicy violationPolicy)
Builds a
QuotaProtos.SpaceQuota protobuf object given the arguments. |
private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest |
buildProtoFromQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota protoQuota)
Build a
QuotaProtos.SpaceLimitRequest protobuf object from the given QuotaProtos.SpaceQuota. |
private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest |
buildProtoRemoveQuota()
Builds a
QuotaProtos.SpaceQuota protobuf object to remove a quota. |
boolean |
equals(Object o) |
(package private) static SpaceLimitSettings |
fromSpaceQuota(String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
Constructs a
SpaceLimitSettings from the provided protobuf message and namespace. |
(package private) static SpaceLimitSettings |
fromSpaceQuota(TableName tableName,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
Constructs a
SpaceLimitSettings from the provided protobuf message and tablename. |
(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest |
getProto()
Returns a copy of the internal state of
this |
QuotaType |
getQuotaType() |
int |
hashCode() |
protected QuotaSettings |
merge(QuotaSettings newSettings)
Merges the provided settings with
this and returns a new settings
object to the caller if the merged settings differ from the original. |
protected void |
setupSetQuotaRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder builder)
Called by toSetQuotaRequestProto()
the subclass should implement this method to set the specific SetQuotaRequest
properties.
|
String |
toString() |
(package private) static void |
validateProtoArguments(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
Validates that the provided protobuf SpaceQuota has the necessary information to construct
a
SpaceLimitSettings. |
private void |
validateSizeLimit(long sizeLimit) |
buildFromProto, buildSetQuotaRequestProto, getNamespace, getTableName, getUserName, ownerToString, sizeToString, timeToString, validateQuotaTargetprivate final org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest proto
SpaceLimitSettings(TableName tableName, long sizeLimit, SpaceViolationPolicy violationPolicy)
SpaceLimitSettings(TableName tableName)
SpaceLimitSettings to remove a space quota on the given tableName.SpaceLimitSettings(String namespace, long sizeLimit, SpaceViolationPolicy violationPolicy)
SpaceLimitSettings(String namespace)
SpaceLimitSettings to remove a space quota on the given namespace.SpaceLimitSettings(TableName tableName, String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest req)
private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoFromQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota protoQuota)
QuotaProtos.SpaceLimitRequest protobuf object from the given QuotaProtos.SpaceQuota.protoQuota - The preconstructed SpaceQuota protobufprivate org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoAddQuota(long sizeLimit, SpaceViolationPolicy violationPolicy)
QuotaProtos.SpaceQuota protobuf object given the arguments.sizeLimit - The size limit of the quota.violationPolicy - The action to take when the quota is exceeded.private org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest buildProtoRemoveQuota()
QuotaProtos.SpaceQuota protobuf object to remove a quota.org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceLimitRequest getProto()
thispublic QuotaType getQuotaType()
getQuotaType in class QuotaSettingsprotected void setupSetQuotaRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder builder)
QuotaSettingssetupSetQuotaRequest in class QuotaSettingsstatic SpaceLimitSettings fromSpaceQuota(TableName tableName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
SpaceLimitSettings from the provided protobuf message and tablename.tableName - The target tablename for the limit.proto - The protobuf representation.static SpaceLimitSettings fromSpaceQuota(String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
SpaceLimitSettings from the provided protobuf message and namespace.namespace - The target namespace for the limit.proto - The protobuf representation.static void validateProtoArguments(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota proto)
SpaceLimitSettings.proto - The protobuf message to validate.protected QuotaSettings merge(QuotaSettings newSettings)
QuotaSettingsthis and returns a new settings
object to the caller if the merged settings differ from the original.merge in class QuotaSettingsnewSettings - The new settings to merge in.QuotaSettings object or null if the quota should be deleted.private void validateSizeLimit(long sizeLimit)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.