@InterfaceAudience.Private
@InterfaceStability.Evolving
public class QuotaUtil
extends org.apache.hadoop.hbase.quotas.QuotaTableUtil
org.apache.hadoop.hbase.quotas.QuotaTableUtil.NamespaceQuotasVisitor, org.apache.hadoop.hbase.quotas.QuotaTableUtil.QuotasVisitor, org.apache.hadoop.hbase.quotas.QuotaTableUtil.TableQuotasVisitor, org.apache.hadoop.hbase.quotas.QuotaTableUtil.UserQuotasVisitor| Modifier and Type | Field and Description |
|---|---|
static String |
QUOTA_CONF_KEY |
static org.apache.hadoop.hbase.HTableDescriptor |
QUOTA_TABLE_DESC
Table descriptor for Quota internal table
|
QUOTA_FAMILY_INFO, QUOTA_FAMILY_USAGE, QUOTA_NAMESPACE_ROW_KEY_PREFIX, QUOTA_POLICY_COLUMN, QUOTA_QUALIFIER_POLICY, QUOTA_QUALIFIER_SETTINGS, QUOTA_QUALIFIER_SETTINGS_PREFIX, QUOTA_SNAPSHOT_SIZE_QUALIFIER, QUOTA_TABLE_NAME, QUOTA_TABLE_ROW_KEY_PREFIX, QUOTA_USER_ROW_KEY_PREFIX| Constructor and Description |
|---|
QuotaUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addNamespaceQuota(org.apache.hadoop.hbase.client.Connection connection,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addTableQuota(org.apache.hadoop.hbase.client.Connection connection,
org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data) |
static long |
calculateMutationSize(org.apache.hadoop.hbase.client.Mutation mutation) |
static long |
calculateResultSize(List<org.apache.hadoop.hbase.client.Result> results) |
static long |
calculateResultSize(org.apache.hadoop.hbase.client.Result result) |
static void |
deleteNamespaceQuota(org.apache.hadoop.hbase.client.Connection connection,
String namespace) |
static void |
deleteTableQuota(org.apache.hadoop.hbase.client.Connection connection,
org.apache.hadoop.hbase.TableName table) |
static void |
deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user) |
static void |
deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
String namespace) |
static void |
deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.TableName table) |
static <K> Map<K,QuotaState> |
fetchGlobalQuotas(String type,
org.apache.hadoop.hbase.client.Connection connection,
List<org.apache.hadoop.hbase.client.Get> gets,
org.apache.hadoop.hbase.quotas.QuotaUtil.KeyFromRow<K> kfr) |
static Map<String,QuotaState> |
fetchNamespaceQuotas(org.apache.hadoop.hbase.client.Connection connection,
List<org.apache.hadoop.hbase.client.Get> gets) |
static Map<org.apache.hadoop.hbase.TableName,QuotaState> |
fetchTableQuotas(org.apache.hadoop.hbase.client.Connection connection,
List<org.apache.hadoop.hbase.client.Get> gets) |
static Map<String,UserQuotaState> |
fetchUserQuotas(org.apache.hadoop.hbase.client.Connection connection,
List<org.apache.hadoop.hbase.client.Get> gets) |
static boolean |
isQuotaEnabled(org.apache.hadoop.conf.Configuration conf)
Returns true if the support for quota is enabled
|
doGet, doGet, extractQuotaSnapshot, extractSnapshotNameFromSizeCell, extractSnapshotSize, getCurrentSnapshot, getCurrentSnapshot, getMasterReportedTableSizes, getNamespaceFromRowKey, getNamespaceQuota, getNamespaceRowKey, getNamespaceRowKeyRegex, getObservedSnapshotSizes, getProtoViolationPolicy, getRegionServerQuotaSnapshots, getSettingsQualifierForUserNamespace, getSettingsQualifierForUserTable, getSettingsQualifierRegexForUserNamespace, getSettingsQualifierRegexForUserTable, getSnapshots, getSnapshotSizeQualifier, getTableFromRowKey, getTableQuota, getTableRowKey, getTableRowKeyRegex, getUserFromRowKey, getUserQuota, getUserQuota, getUserQuota, getUserRowKey, getUserRowKeyRegex, getViolationPolicy, isEmptyQuota, isNamespaceRowKey, isTableRowKey, isUserRowKey, makeFilter, makeGetForNamespaceQuotas, makeGetForTableQuotas, makeGetForUserQuotas, makeQuotaSnapshotScan, makeQuotaSnapshotScanForTable, makeScan, parseNamespaceResult, parseNamespaceResult, parseResult, parseResultToCollection, parseTableResult, parseTableResult, parseUserResult, parseUserResult, quotasFromData, quotasFromData, quotasToDatapublic static final String QUOTA_CONF_KEY
public static final org.apache.hadoop.hbase.HTableDescriptor QUOTA_TABLE_DESC
public static boolean isQuotaEnabled(org.apache.hadoop.conf.Configuration conf)
public static void addTableQuota(org.apache.hadoop.hbase.client.Connection connection,
org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
IOExceptionpublic static void deleteTableQuota(org.apache.hadoop.hbase.client.Connection connection,
org.apache.hadoop.hbase.TableName table)
throws IOException
IOExceptionpublic static void addNamespaceQuota(org.apache.hadoop.hbase.client.Connection connection,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
IOExceptionpublic static void deleteNamespaceQuota(org.apache.hadoop.hbase.client.Connection connection,
String namespace)
throws IOException
IOExceptionpublic static void addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
IOExceptionpublic static void addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.TableName table,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
IOExceptionpublic static void addUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
String namespace,
org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
IOExceptionpublic static void deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user)
throws IOException
IOExceptionpublic static void deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
org.apache.hadoop.hbase.TableName table)
throws IOException
IOExceptionpublic static void deleteUserQuota(org.apache.hadoop.hbase.client.Connection connection,
String user,
String namespace)
throws IOException
IOExceptionpublic static Map<String,UserQuotaState> fetchUserQuotas(org.apache.hadoop.hbase.client.Connection connection, List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
IOExceptionpublic static Map<org.apache.hadoop.hbase.TableName,QuotaState> fetchTableQuotas(org.apache.hadoop.hbase.client.Connection connection, List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
IOExceptionpublic static Map<String,QuotaState> fetchNamespaceQuotas(org.apache.hadoop.hbase.client.Connection connection, List<org.apache.hadoop.hbase.client.Get> gets) throws IOException
IOExceptionpublic static <K> Map<K,QuotaState> fetchGlobalQuotas(String type, org.apache.hadoop.hbase.client.Connection connection, List<org.apache.hadoop.hbase.client.Get> gets, org.apache.hadoop.hbase.quotas.QuotaUtil.KeyFromRow<K> kfr) throws IOException
IOExceptionpublic static long calculateMutationSize(org.apache.hadoop.hbase.client.Mutation mutation)
public static long calculateResultSize(org.apache.hadoop.hbase.client.Result result)
public static long calculateResultSize(List<org.apache.hadoop.hbase.client.Result> results)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.