Package org.apache.hadoop.hbase.quotas
Class ThrottleSettings
java.lang.Object
org.apache.hadoop.hbase.quotas.QuotaSettings
org.apache.hadoop.hbase.quotas.ThrottleSettings
-
Field Summary
Modifier and TypeFieldDescription(package private) final org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest
-
Constructor Summary
ConstructorDescriptionThrottleSettings
(String userName, TableName tableName, String namespace, String regionServer, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest proto) -
Method Summary
Modifier and TypeMethodDescription(package private) static ThrottleSettings
fromTimedQuota
(String userName, TableName tableName, String namespace, String regionServer, ThrottleType type, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota timedQuota) (package private) org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest
getProto()
Returns a copy of the internal state ofthis
long
protected ThrottleSettings
merge
(QuotaSettings other) Merges the provided settings withthis
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.toString()
private void
validateTimedQuota
(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota timedQuota) Methods inherited from class org.apache.hadoop.hbase.quotas.QuotaSettings
buildFromProto, buildSetQuotaRequestProto, getNamespace, getRegionServer, getTableName, getUserName, ownerToString, sizeToString, timeToString, validateQuotaTarget
-
Field Details
-
proto
-
-
Constructor Details
-
ThrottleSettings
ThrottleSettings(String userName, TableName tableName, String namespace, String regionServer, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest proto)
-
-
Method Details
-
getThrottleType
-
getSoftLimit
-
getProto
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest getProto()Returns a copy of the internal state ofthis
-
getTimeUnit
-
getQuotaScope
-
getQuotaType
- Specified by:
getQuotaType
in classQuotaSettings
-
setupSetQuotaRequest
protected void setupSetQuotaRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder builder) Description copied from class:QuotaSettings
Called by toSetQuotaRequestProto() the subclass should implement this method to set the specific SetQuotaRequest properties.- Specified by:
setupSetQuotaRequest
in classQuotaSettings
-
toString
-
merge
Description copied from class:QuotaSettings
Merges the provided settings withthis
and returns a new settings object to the caller if the merged settings differ from the original.- Specified by:
merge
in classQuotaSettings
- Parameters:
other
- The new settings to merge in.- Returns:
- The merged
QuotaSettings
object or null if the quota should be deleted. - Throws:
IOException
-
validateTimedQuota
private void validateTimedQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota timedQuota) throws IOException - Throws:
IOException
-
fromTimedQuota
static ThrottleSettings fromTimedQuota(String userName, TableName tableName, String namespace, String regionServer, ThrottleType type, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.TimedQuota timedQuota)
-