@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 org.apache.hadoop.hbase.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
All Methods Static Methods Concrete Methods
Modifier and Type
Method and Description
protected static Result
doGet(Connection connection,
Get get)
protected static Result[]
doGet(Connection connection,
List<Get> gets)
protected static String
getNamespaceFromRowKey(byte[] key)
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
getNamespaceQuota(Connection connection,
String namespace)
protected static byte[]
getNamespaceRowKey(String namespace)
protected static String
getNamespaceRowKeyRegex(String namespace)
protected static byte[]
getSettingsQualifierForUserNamespace(String namespace)
protected static byte[]
getSettingsQualifierForUserTable(org.apache.hadoop.hbase.TableName tableName)
protected static String
getSettingsQualifierRegexForUserNamespace(String namespace)
protected static String
getSettingsQualifierRegexForUserTable(String table)
protected static org.apache.hadoop.hbase.TableName
getTableFromRowKey(byte[] key)
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
getTableQuota(Connection connection,
org.apache.hadoop.hbase.TableName table)
protected static byte[]
getTableRowKey(org.apache.hadoop.hbase.TableName table)
protected static String
getTableRowKeyRegex(String table)
protected static String
getUserFromRowKey(byte[] key)
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
getUserQuota(Connection connection,
String user)
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
getUserQuota(Connection connection,
String user,
String namespace)
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
getUserQuota(Connection connection,
String user,
org.apache.hadoop.hbase.TableName table)
protected static byte[]
getUserRowKey(String user)
protected static String
getUserRowKeyRegex(String user)
static boolean
isEmptyQuota(org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas quotas)
protected static boolean
isNamespaceRowKey(byte[] key)
protected static boolean
isTableRowKey(byte[] key)
protected static boolean
isUserRowKey(byte[] key)
static Filter
makeFilter(QuotaFilter filter)
converts quotafilter to serializeable filterlists.
static Get
makeGetForNamespaceQuotas(String namespace)
static Get
makeGetForTableQuotas(org.apache.hadoop.hbase.TableName table)
static Get
makeGetForUserQuotas(String user,
Iterable<org.apache.hadoop.hbase.TableName> tables,
Iterable<String> namespaces)
static Scan
makeScan(QuotaFilter filter)
static void
parseNamespaceResult(Result result,
QuotaTableUtil.NamespaceQuotasVisitor visitor)
protected static void
parseNamespaceResult(String namespace,
Result result,
QuotaTableUtil.NamespaceQuotasVisitor visitor)
static void
parseResult(Result result,
QuotaTableUtil.QuotasVisitor visitor)
static void
parseTableResult(Result result,
QuotaTableUtil.TableQuotasVisitor visitor)
protected static void
parseTableResult(org.apache.hadoop.hbase.TableName table,
Result result,
QuotaTableUtil.TableQuotasVisitor visitor)
static void
parseUserResult(Result result,
QuotaTableUtil.UserQuotasVisitor visitor)
protected static void
parseUserResult(String userName,
Result result,
QuotaTableUtil.UserQuotasVisitor visitor)
protected static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas
quotasFromData(byte[] data)
protected static byte[]
quotasToData(org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data)
-
-
Field Detail
-
QUOTA_TABLE_NAME
public static final org.apache.hadoop.hbase.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 org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getTableQuota(Connection connection,
org.apache.hadoop.hbase.TableName table)
throws IOException
- Throws:
IOException
-
getNamespaceQuota
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getNamespaceQuota(Connection connection,
String namespace)
throws IOException
- Throws:
IOException
-
getUserQuota
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection,
String user)
throws IOException
- Throws:
IOException
-
getUserQuota
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection,
String user,
org.apache.hadoop.hbase.TableName table)
throws IOException
- Throws:
IOException
-
getUserQuota
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection,
String user,
String namespace)
throws IOException
- Throws:
IOException
-
makeGetForTableQuotas
public static Get makeGetForTableQuotas(org.apache.hadoop.hbase.TableName table)
-
makeGetForUserQuotas
public static Get makeGetForUserQuotas(String user,
Iterable<org.apache.hadoop.hbase.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(org.apache.hadoop.hbase.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 org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas quotasFromData(byte[] data)
throws IOException
- Throws:
IOException
-
quotasToData
protected static byte[] quotasToData(org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data)
throws IOException
- Throws:
IOException
-
isEmptyQuota
public static boolean isEmptyQuota(org.apache.hadoop.hbase.protobuf.generated.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(org.apache.hadoop.hbase.TableName table)
-
getNamespaceRowKey
protected static byte[] getNamespaceRowKey(String namespace)
-
getSettingsQualifierForUserTable
protected static byte[] getSettingsQualifierForUserTable(org.apache.hadoop.hbase.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 org.apache.hadoop.hbase.TableName getTableFromRowKey(byte[] key)
-
isUserRowKey
protected static boolean isUserRowKey(byte[] key)
-
getUserFromRowKey
protected static String getUserFromRowKey(byte[] key)
Copyright © 2007–2017. All rights reserved.