@InterfaceAudience.Private @InterfaceStability.Evolving public class QuotaUtil extends QuotaTableUtil
| Modifier and Type | Class and Description |
|---|---|
private static interface |
QuotaUtil.KeyFromRow<T> |
QuotaTableUtil.NamespaceQuotasVisitor, QuotaTableUtil.QuotasVisitor, QuotaTableUtil.TableQuotasVisitor, QuotaTableUtil.UserQuotasVisitor| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
LOG |
static String |
QUOTA_CONF_KEY |
private static boolean |
QUOTA_ENABLED_DEFAULT |
static HTableDescriptor |
QUOTA_TABLE_DESC
Table descriptor for Quota internal table
|
QUOTA_FAMILY_INFO, QUOTA_FAMILY_USAGE, QUOTA_NAMESPACE_ROW_KEY_PREFIX, QUOTA_QUALIFIER_SETTINGS, QUOTA_QUALIFIER_SETTINGS_PREFIX, 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(Connection connection,
String namespace,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
private static void |
addQuotas(Connection connection,
byte[] rowKey,
byte[] qualifier,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
private static void |
addQuotas(Connection connection,
byte[] rowKey,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addTableQuota(Connection connection,
TableName table,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(Connection connection,
String user,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(Connection connection,
String user,
String namespace,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
static void |
addUserQuota(Connection connection,
String user,
TableName table,
org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) |
static long |
calculateMutationSize(Mutation mutation) |
static long |
calculateResultSize(List<Result> results) |
static long |
calculateResultSize(Result result) |
static void |
deleteNamespaceQuota(Connection connection,
String namespace) |
private static void |
deleteQuotas(Connection connection,
byte[] rowKey) |
private static void |
deleteQuotas(Connection connection,
byte[] rowKey,
byte[] qualifier) |
static void |
deleteTableQuota(Connection connection,
TableName table) |
static void |
deleteUserQuota(Connection connection,
String user) |
static void |
deleteUserQuota(Connection connection,
String user,
String namespace) |
static void |
deleteUserQuota(Connection connection,
String user,
TableName table) |
private static void |
doDelete(Connection connection,
Delete delete) |
private static void |
doPut(Connection connection,
Put put) |
static <K> Map<K,QuotaState> |
fetchGlobalQuotas(String type,
Connection connection,
List<Get> gets,
QuotaUtil.KeyFromRow<K> kfr) |
static Map<String,QuotaState> |
fetchNamespaceQuotas(Connection connection,
List<Get> gets) |
static Map<TableName,QuotaState> |
fetchTableQuotas(Connection connection,
List<Get> gets) |
static Map<String,UserQuotaState> |
fetchUserQuotas(Connection connection,
List<Get> gets) |
static boolean |
isQuotaEnabled(org.apache.hadoop.conf.Configuration conf)
Returns true if the support for quota is enabled
|
doGet, doGet, getNamespaceFromRowKey, getNamespaceQuota, getNamespaceRowKey, getNamespaceRowKeyRegex, getSettingsQualifierForUserNamespace, getSettingsQualifierForUserTable, getSettingsQualifierRegexForUserNamespace, getSettingsQualifierRegexForUserTable, getTableFromRowKey, getTableQuota, getTableRowKey, getTableRowKeyRegex, getUserFromRowKey, getUserQuota, getUserQuota, getUserQuota, getUserRowKey, getUserRowKeyRegex, isEmptyQuota, isNamespaceRowKey, isTableRowKey, isUserRowKey, makeFilter, makeGetForNamespaceQuotas, makeGetForTableQuotas, makeGetForUserQuotas, makeScan, parseNamespaceResult, parseNamespaceResult, parseResult, parseTableResult, parseTableResult, parseUserResult, parseUserResult, quotasFromData, quotasToDataprivate static final org.apache.commons.logging.Log LOG
public static final String QUOTA_CONF_KEY
private static final boolean QUOTA_ENABLED_DEFAULT
public static final HTableDescriptor QUOTA_TABLE_DESC
public static boolean isQuotaEnabled(org.apache.hadoop.conf.Configuration conf)
public static void addTableQuota(Connection connection, TableName table, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionpublic static void deleteTableQuota(Connection connection, TableName table) throws IOException
IOExceptionpublic static void addNamespaceQuota(Connection connection, String namespace, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionpublic static void deleteNamespaceQuota(Connection connection, String namespace) throws IOException
IOExceptionpublic static void addUserQuota(Connection connection, String user, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionpublic static void addUserQuota(Connection connection, String user, TableName table, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionpublic static void addUserQuota(Connection connection, String user, String namespace, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionpublic static void deleteUserQuota(Connection connection, String user) throws IOException
IOExceptionpublic static void deleteUserQuota(Connection connection, String user, TableName table) throws IOException
IOExceptionpublic static void deleteUserQuota(Connection connection, String user, String namespace) throws IOException
IOExceptionprivate static void addQuotas(Connection connection, byte[] rowKey, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionprivate static void addQuotas(Connection connection, byte[] rowKey, byte[] qualifier, org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOExceptionprivate static void deleteQuotas(Connection connection, byte[] rowKey) throws IOException
IOExceptionprivate static void deleteQuotas(Connection connection, byte[] rowKey, byte[] qualifier) throws IOException
IOExceptionpublic static Map<String,UserQuotaState> fetchUserQuotas(Connection connection, List<Get> gets) throws IOException
IOExceptionpublic static Map<TableName,QuotaState> fetchTableQuotas(Connection connection, List<Get> gets) throws IOException
IOExceptionpublic static Map<String,QuotaState> fetchNamespaceQuotas(Connection connection, List<Get> gets) throws IOException
IOExceptionpublic static <K> Map<K,QuotaState> fetchGlobalQuotas(String type, Connection connection, List<Get> gets, QuotaUtil.KeyFromRow<K> kfr) throws IOException
IOExceptionprivate static void doPut(Connection connection, Put put) throws IOException
IOExceptionprivate static void doDelete(Connection connection, Delete delete) throws IOException
IOExceptionpublic static long calculateMutationSize(Mutation mutation)
public static long calculateResultSize(Result result)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.