@InterfaceAudience.Public public class QuotaSettingsFactory extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
QuotaSettingsFactory.QuotaGlobalsSettingsBypass |
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
|
(package private) static List<QuotaSettings> |
fromNamespaceQuotas(String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
private static List<QuotaSettings> |
fromQuotas(String userName,
TableName tableName,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
(package private) static QuotaSettings |
fromSpace(TableName table,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota protoQuota) |
(package private) static List<QuotaSettings> |
fromTableQuotas(TableName tableName,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
protected static List<QuotaSettings> |
fromThrottle(String userName,
TableName tableName,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle) |
(package private) static List<QuotaSettings> |
fromUserQuotas(String userName,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
(package private) static List<QuotaSettings> |
fromUserQuotas(String userName,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
(package private) static List<QuotaSettings> |
fromUserQuotas(String userName,
TableName tableName,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas) |
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. |
private static QuotaSettings |
throttle(String userName,
TableName tableName,
String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit) |
static QuotaSettings |
throttleNamespace(String namespace,
ThrottleType type,
long limit,
TimeUnit timeUnit)
Throttle the specified namespace.
|
static QuotaSettings |
throttleTable(TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit)
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,
TableName tableName,
ThrottleType type,
long limit,
TimeUnit timeUnit)
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 |
unthrottleNamespace(String namespace)
Remove the throttling for the specified namespace.
|
static QuotaSettings |
unthrottleTable(TableName tableName)
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.
|
public QuotaSettingsFactory()
static List<QuotaSettings> fromUserQuotas(String userName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
static List<QuotaSettings> fromUserQuotas(String userName, TableName tableName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
static List<QuotaSettings> fromUserQuotas(String userName, String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
static List<QuotaSettings> fromTableQuotas(TableName tableName, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
static List<QuotaSettings> fromNamespaceQuotas(String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
private static List<QuotaSettings> fromQuotas(String userName, TableName tableName, String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas quotas)
protected static List<QuotaSettings> fromThrottle(String userName, TableName tableName, String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Throttle throttle)
static QuotaSettings fromSpace(TableName table, String namespace, org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.SpaceQuota protoQuota)
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, 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, 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 unthrottleUser(String userName)
userName
- the userpublic static QuotaSettings unthrottleUser(String userName, TableName tableName)
userName
- the usertableName
- the tablepublic static QuotaSettings unthrottleUser(String userName, String namespace)
userName
- the usernamespace
- the namespacepublic 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 unthrottleTable(TableName tableName)
tableName
- the tablepublic 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 unthrottleNamespace(String namespace)
namespace
- the namespaceprivate static QuotaSettings throttle(String userName, TableName tableName, String namespace, ThrottleType type, long limit, TimeUnit timeUnit)
public 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–2019 The Apache Software Foundation. All rights reserved.