@InterfaceAudience.Private @InterfaceStability.Evolving public class QuotaTableUtil extends Object
ROW-KEY FAM/QUAL DATA
n. q:s
t. q:s
u. q:s
u. q:s.
u. q:s.:
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
static interface
QuotaTableUtil.NamespaceQuotasVisitor
static interface
QuotaTableUtil.QuotasVisitor
static interface
QuotaTableUtil.TableQuotasVisitor
static interface
QuotaTableUtil.UserQuotasVisitor
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static byte[]
QUOTA_FAMILY_INFO
protected static byte[]
QUOTA_FAMILY_USAGE
protected static byte[]
QUOTA_NAMESPACE_ROW_KEY_PREFIX
protected static byte[]
QUOTA_QUALIFIER_SETTINGS
protected static byte[]
QUOTA_QUALIFIER_SETTINGS_PREFIX
static TableName
QUOTA_TABLE_NAME
System table for quotas
protected static byte[]
QUOTA_TABLE_ROW_KEY_PREFIX
protected static byte[]
QUOTA_USER_ROW_KEY_PREFIX
-
Constructor Summary
Constructors
Constructor and Description
QuotaTableUtil()
-
Method Summary
-
-
Field Detail
-
QUOTA_TABLE_NAME
public static final TableName QUOTA_TABLE_NAME
System table for quotas
-
QUOTA_FAMILY_INFO
protected static final byte[] QUOTA_FAMILY_INFO
-
QUOTA_FAMILY_USAGE
protected static final byte[] QUOTA_FAMILY_USAGE
-
QUOTA_QUALIFIER_SETTINGS
protected static final byte[] QUOTA_QUALIFIER_SETTINGS
-
QUOTA_QUALIFIER_SETTINGS_PREFIX
protected static final byte[] QUOTA_QUALIFIER_SETTINGS_PREFIX
-
QUOTA_USER_ROW_KEY_PREFIX
protected static final byte[] QUOTA_USER_ROW_KEY_PREFIX
-
QUOTA_TABLE_ROW_KEY_PREFIX
protected static final byte[] QUOTA_TABLE_ROW_KEY_PREFIX
-
QUOTA_NAMESPACE_ROW_KEY_PREFIX
protected static final byte[] QUOTA_NAMESPACE_ROW_KEY_PREFIX
-
Method Detail
-
getTableQuota
public static QuotaProtos.Quotas getTableQuota(Connection connection,
TableName table)
throws IOException
- Throws:
IOException
-
getNamespaceQuota
public static QuotaProtos.Quotas getNamespaceQuota(Connection connection,
String namespace)
throws IOException
- Throws:
IOException
-
getUserQuota
public static QuotaProtos.Quotas getUserQuota(Connection connection,
String user)
throws IOException
- Throws:
IOException
-
getUserQuota
public static QuotaProtos.Quotas getUserQuota(Connection connection,
String user,
TableName table)
throws IOException
- Throws:
IOException
-
getUserQuota
public static QuotaProtos.Quotas getUserQuota(Connection connection,
String user,
String namespace)
throws IOException
- Throws:
IOException
-
makeGetForUserQuotas
public static Get makeGetForUserQuotas(String user,
Iterable<TableName> tables,
Iterable<String> namespaces)
-
makeScan
public static Scan makeScan(QuotaFilter filter)
-
makeFilter
public static Filter makeFilter(QuotaFilter filter)
converts quotafilter to serializeable filterlists.
-
parseResult
public static void parseResult(Result result,
QuotaTableUtil.QuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseNamespaceResult
public static void parseNamespaceResult(Result result,
QuotaTableUtil.NamespaceQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseNamespaceResult
protected static void parseNamespaceResult(String namespace,
Result result,
QuotaTableUtil.NamespaceQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseTableResult
public static void parseTableResult(Result result,
QuotaTableUtil.TableQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseTableResult
protected static void parseTableResult(TableName table,
Result result,
QuotaTableUtil.TableQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseUserResult
public static void parseUserResult(Result result,
QuotaTableUtil.UserQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
parseUserResult
protected static void parseUserResult(String userName,
Result result,
QuotaTableUtil.UserQuotasVisitor visitor)
throws IOException
- Throws:
IOException
-
quotasFromData
protected static QuotaProtos.Quotas quotasFromData(byte[] data)
throws IOException
- Throws:
IOException
-
quotasToData
protected static byte[] quotasToData(QuotaProtos.Quotas data)
throws IOException
- Throws:
IOException
-
isEmptyQuota
public static boolean isEmptyQuota(QuotaProtos.Quotas quotas)
-
doGet
protected static Result doGet(Connection connection,
Get get)
throws IOException
- Throws:
IOException
-
doGet
protected static Result[] doGet(Connection connection,
List<Get> gets)
throws IOException
- Throws:
IOException
-
getUserRowKey
protected static byte[] getUserRowKey(String user)
-
getTableRowKey
protected static byte[] getTableRowKey(TableName table)
-
getNamespaceRowKey
protected static byte[] getNamespaceRowKey(String namespace)
-
getSettingsQualifierForUserTable
protected static byte[] getSettingsQualifierForUserTable(TableName tableName)
-
getSettingsQualifierForUserNamespace
protected static byte[] getSettingsQualifierForUserNamespace(String namespace)
-
getSettingsQualifierRegexForUserTable
protected static String getSettingsQualifierRegexForUserTable(String table)
-
getSettingsQualifierRegexForUserNamespace
protected static String getSettingsQualifierRegexForUserNamespace(String namespace)
-
isNamespaceRowKey
protected static boolean isNamespaceRowKey(byte[] key)
-
getNamespaceFromRowKey
protected static String getNamespaceFromRowKey(byte[] key)
-
isTableRowKey
protected static boolean isTableRowKey(byte[] key)
-
getTableFromRowKey
protected static TableName getTableFromRowKey(byte[] key)
-
isUserRowKey
protected static boolean isUserRowKey(byte[] key)
-
getUserFromRowKey
protected static String getUserFromRowKey(byte[] key)
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.