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
FieldsModifier and TypeFieldDescription(package private) final org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.ThrottleRequest -
Constructor Summary
ConstructorsConstructorDescriptionThrottleSettings(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 ThrottleSettingsfromTimedQuota(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.ThrottleRequestgetProto()Returns a copy of the internal state ofthislongprotected ThrottleSettingsmerge(QuotaSettings other) Merges the provided settings withthisand returns a new settings object to the caller if the merged settings differ from the original.protected voidsetupSetQuotaRequest(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 voidvalidateTimedQuota(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:
getQuotaTypein classQuotaSettings
-
setupSetQuotaRequest
protected void setupSetQuotaRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetQuotaRequest.Builder builder) Description copied from class:QuotaSettingsCalled by toSetQuotaRequestProto() the subclass should implement this method to set the specific SetQuotaRequest properties.- Specified by:
setupSetQuotaRequestin classQuotaSettings
-
toString
-
merge
Description copied from class:QuotaSettingsMerges the provided settings withthisand returns a new settings object to the caller if the merged settings differ from the original.- Specified by:
mergein classQuotaSettings- Parameters:
other- The new settings to merge in.- Returns:
- The merged
QuotaSettingsobject 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)
-