@InterfaceAudience.Public public class QuotaSettingsFactory extends Object
Constructor and Description |
---|
QuotaSettingsFactory() |
Modifier and Type | Method and Description |
---|---|
static QuotaSettings |
bypassGlobals(String userName,
boolean bypassGlobals)
Set the "bypass global settings" for the specified user
|
static List<org.apache.hadoop.hbase.quotas.ThrottleSettings> |
fromTableThrottles(TableName tableName,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle) |
protected static List<org.apache.hadoop.hbase.quotas.ThrottleSettings> |
fromThrottle(String userName,
TableName tableName,
String namespace,
String regionServer,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle) |
static QuotaSettings |
limitNamespaceSpace(String namespace,
long sizeLimit,
SpaceViolationPolicy violationPolicy)
Creates a
QuotaSettings object to limit the FileSystem space usage for the given
namespace to the given size in bytes. |
static QuotaSettings |
limitTableSpace(TableName tableName,
long sizeLimit,
SpaceViolationPolicy violationPolicy)
Creates a
QuotaSettings object to limit the FileSystem space usage for the given table
to the given size in bytes. |
static QuotaSettings |
removeNamespaceSpaceLimit(String namespace)
Creates a
QuotaSettings object to remove the FileSystem space quota for the given
namespace. |
static QuotaSettings |
removeTableSpaceLimit(TableName tableName)
Creates a
QuotaSettings object to remove the FileSystem space quota for the given
table. |
static QuotaSettings |
throttleNamespace(String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified namespace.
|
static QuotaSettings |
throttleNamespace(String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit,
QuotaScope scope)
Throttle the specified namespace.
|
static QuotaSettings |
throttleRegionServer(String regionServer,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified region server.
|
static QuotaSettings |
throttleTable(TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified table.
|
static QuotaSettings |
throttleTable(TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit,
QuotaScope scope)
Throttle the specified table.
|
static QuotaSettings |
throttleUser(String userName,
String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified user on the specified namespace.
|
static QuotaSettings |
throttleUser(String userName,
String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit,
QuotaScope scope)
Throttle the specified user on the specified namespace.
|
static QuotaSettings |
throttleUser(String userName,
TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified user on the specified table.
|
static QuotaSettings |
throttleUser(String userName,
TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit,
QuotaScope scope)
Throttle the specified user on the specified table.
|
static QuotaSettings |
throttleUser(String userName,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified user.
|
static QuotaSettings |
throttleUser(String userName,
ThrottleType type,
long limit,
TimeUnit timeUnit,
QuotaScope scope)
Throttle the specified user.
|
static QuotaSettings |
unthrottleNamespace(String namespace)
Remove the throttling for the specified namespace.
|
static QuotaSettings |
unthrottleNamespaceByThrottleType(String namespace,
ThrottleType type)
Remove the throttling for the specified namespace by throttle type.
|
static QuotaSettings |
unthrottleRegionServer(String regionServer)
Remove the throttling for the specified region server.
|
static QuotaSettings |
unthrottleRegionServerByThrottleType(String regionServer,
ThrottleType type)
Remove the throttling for the specified region server by throttle type.
|
static QuotaSettings |
unthrottleTable(TableName tableName)
Remove the throttling for the specified table.
|
static QuotaSettings |
unthrottleTableByThrottleType(TableName tableName,
ThrottleType type)
Remove the throttling for the specified table.
|
static QuotaSettings |
unthrottleUser(String userName)
Remove the throttling for the specified user.
|
static QuotaSettings |
unthrottleUser(String userName,
String namespace)
Remove the throttling for the specified user on the specified namespace.
|
static QuotaSettings |
unthrottleUser(String userName,
TableName tableName)
Remove the throttling for the specified user on the specified table.
|
static QuotaSettings |
unthrottleUserByThrottleType(String userName,
String namespace,
ThrottleType type)
Remove the throttling for the specified user on the specified namespace.
|
static QuotaSettings |
unthrottleUserByThrottleType(String userName,
TableName tableName,
ThrottleType type)
Remove the throttling for the specified user on the specified table.
|
static QuotaSettings |
unthrottleUserByThrottleType(String userName,
ThrottleType type)
Remove the throttling for the specified user.
|
public QuotaSettingsFactory()
public static List<org.apache.hadoop.hbase.quotas.ThrottleSettings> fromTableThrottles(TableName tableName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle)
protected static List<org.apache.hadoop.hbase.quotas.ThrottleSettings> fromThrottle(String userName, TableName tableName, String namespace, String regionServer, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle)
public static QuotaSettings throttleUser(String userName, ThrottleType type, long limit, TimeUnit timeUnit)
userName
- the user to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings throttleUser(String userName, ThrottleType type, long limit, TimeUnit timeUnit, QuotaScope scope)
userName
- the user to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitscope
- the scope of throttlingpublic static QuotaSettings throttleUser(String userName, TableName tableName, ThrottleType type, long limit, TimeUnit timeUnit)
userName
- the user to throttletableName
- the table to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings throttleUser(String userName, TableName tableName, ThrottleType type, long limit, TimeUnit timeUnit, QuotaScope scope)
userName
- the user to throttletableName
- the table to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitscope
- the scope of throttlingpublic static QuotaSettings throttleUser(String userName, String namespace, ThrottleType type, long limit, TimeUnit timeUnit)
userName
- the user to throttlenamespace
- the namespace to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings throttleUser(String userName, String namespace, ThrottleType type, long limit, TimeUnit timeUnit, QuotaScope scope)
userName
- the user to throttlenamespace
- the namespace to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitscope
- the scope of throttlingpublic static QuotaSettings unthrottleUser(String userName)
userName
- the userpublic static QuotaSettings unthrottleUserByThrottleType(String userName, ThrottleType type)
userName
- the usertype
- the type of throttlingpublic static QuotaSettings unthrottleUser(String userName, TableName tableName)
userName
- the usertableName
- the tablepublic static QuotaSettings unthrottleUserByThrottleType(String userName, TableName tableName, ThrottleType type)
userName
- the usertableName
- the tabletype
- the type of throttlingpublic static QuotaSettings unthrottleUser(String userName, String namespace)
userName
- the usernamespace
- the namespacepublic static QuotaSettings unthrottleUserByThrottleType(String userName, String namespace, ThrottleType type)
userName
- the usernamespace
- the namespacetype
- the type of throttlingpublic static QuotaSettings throttleTable(TableName tableName, ThrottleType type, long limit, TimeUnit timeUnit)
tableName
- the table to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings throttleTable(TableName tableName, ThrottleType type, long limit, TimeUnit timeUnit, QuotaScope scope)
tableName
- the table to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitscope
- the scope of throttlingpublic static QuotaSettings unthrottleTable(TableName tableName)
tableName
- the tablepublic static QuotaSettings unthrottleTableByThrottleType(TableName tableName, ThrottleType type)
tableName
- the tabletype
- the type of throttlingpublic static QuotaSettings throttleNamespace(String namespace, ThrottleType type, long limit, TimeUnit timeUnit)
namespace
- the namespace to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings throttleNamespace(String namespace, ThrottleType type, long limit, TimeUnit timeUnit, QuotaScope scope)
namespace
- the namespace to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitscope
- the scope of throttlingpublic static QuotaSettings unthrottleNamespace(String namespace)
namespace
- the namespacepublic static QuotaSettings unthrottleNamespaceByThrottleType(String namespace, ThrottleType type)
namespace
- the namespacetype
- the type of throttlingpublic static QuotaSettings throttleRegionServer(String regionServer, ThrottleType type, long limit, TimeUnit timeUnit)
regionServer
- the region server to throttletype
- the type of throttlinglimit
- the allowed number of request/data per timeUnittimeUnit
- the limit time unitpublic static QuotaSettings unthrottleRegionServer(String regionServer)
regionServer
- the region Serverpublic static QuotaSettings unthrottleRegionServerByThrottleType(String regionServer, ThrottleType type)
regionServer
- the region Servertype
- the type of throttlingpublic static QuotaSettings bypassGlobals(String userName, boolean bypassGlobals)
userName
- the user to throttlebypassGlobals
- true if the global settings should be bypassedpublic static QuotaSettings limitTableSpace(TableName tableName, long sizeLimit, SpaceViolationPolicy violationPolicy)
QuotaSettings
object to limit the FileSystem space usage for the given table
to the given size in bytes. When the space usage is exceeded by the table, the provided
SpaceViolationPolicy
is enacted on the table.tableName
- The name of the table on which the quota should be applied.sizeLimit
- The limit of a table's size in bytes.violationPolicy
- The action to take when the quota is exceeded.QuotaSettings
object.public static QuotaSettings removeTableSpaceLimit(TableName tableName)
QuotaSettings
object to remove the FileSystem space quota for the given
table.tableName
- The name of the table to remove the quota for.QuotaSettings
object.public static QuotaSettings limitNamespaceSpace(String namespace, long sizeLimit, SpaceViolationPolicy violationPolicy)
QuotaSettings
object to limit the FileSystem space usage for the given
namespace to the given size in bytes. When the space usage is exceeded by all tables in the
namespace, the provided SpaceViolationPolicy
is enacted on all tables in the namespace.namespace
- The namespace on which the quota should be applied.sizeLimit
- The limit of the namespace's size in bytes.violationPolicy
- The action to take when the the quota is exceeded.QuotaSettings
object.public static QuotaSettings removeNamespaceSpaceLimit(String namespace)
QuotaSettings
object to remove the FileSystem space quota for the given
namespace.namespace
- The namespace to remove the quota on.QuotaSettings
object.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.