@InterfaceAudience.Private @InterfaceStability.Evolving public class QuotaTableUtil extends Object
ROW-KEY FAM/QUAL DATA n.<namespace> q:s <global-quotas> t.<table> q:s <global-quotas> u.<user> q:s <global-quotas> u.<user> q:s.<table> <table-quotas> u.<user> q:s.<ns>: <namespace-quotas>
Modifier and Type | Class and Description |
---|---|
static interface |
QuotaTableUtil.NamespaceQuotasVisitor |
static interface |
QuotaTableUtil.QuotasVisitor |
static interface |
QuotaTableUtil.TableQuotasVisitor |
static interface |
QuotaTableUtil.UserQuotasVisitor |
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 and Description |
---|
QuotaTableUtil() |
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(TableName tableName) |
protected static String |
getSettingsQualifierRegexForUserNamespace(String namespace) |
protected static String |
getSettingsQualifierRegexForUserTable(String table) |
protected static TableName |
getTableFromRowKey(byte[] key) |
static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas |
getTableQuota(Connection connection,
TableName table) |
protected static byte[] |
getTableRowKey(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,
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(TableName table) |
static Get |
makeGetForUserQuotas(String user,
Iterable<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(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) |
public static final TableName QUOTA_TABLE_NAME
protected static final byte[] QUOTA_FAMILY_INFO
protected static final byte[] QUOTA_FAMILY_USAGE
protected static final byte[] QUOTA_QUALIFIER_SETTINGS
protected static final byte[] QUOTA_QUALIFIER_SETTINGS_PREFIX
protected static final byte[] QUOTA_USER_ROW_KEY_PREFIX
protected static final byte[] QUOTA_TABLE_ROW_KEY_PREFIX
protected static final byte[] QUOTA_NAMESPACE_ROW_KEY_PREFIX
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getTableQuota(Connection connection, TableName table) throws IOException
IOException
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getNamespaceQuota(Connection connection, String namespace) throws IOException
IOException
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection, String user) throws IOException
IOException
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection, String user, TableName table) throws IOException
IOException
public static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas getUserQuota(Connection connection, String user, String namespace) throws IOException
IOException
public static Get makeGetForUserQuotas(String user, Iterable<TableName> tables, Iterable<String> namespaces)
public static Scan makeScan(QuotaFilter filter)
public static Filter makeFilter(QuotaFilter filter)
public static void parseResult(Result result, QuotaTableUtil.QuotasVisitor visitor) throws IOException
IOException
public static void parseNamespaceResult(Result result, QuotaTableUtil.NamespaceQuotasVisitor visitor) throws IOException
IOException
protected static void parseNamespaceResult(String namespace, Result result, QuotaTableUtil.NamespaceQuotasVisitor visitor) throws IOException
IOException
public static void parseTableResult(Result result, QuotaTableUtil.TableQuotasVisitor visitor) throws IOException
IOException
protected static void parseTableResult(TableName table, Result result, QuotaTableUtil.TableQuotasVisitor visitor) throws IOException
IOException
public static void parseUserResult(Result result, QuotaTableUtil.UserQuotasVisitor visitor) throws IOException
IOException
protected static void parseUserResult(String userName, Result result, QuotaTableUtil.UserQuotasVisitor visitor) throws IOException
IOException
protected static org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas quotasFromData(byte[] data) throws IOException
IOException
protected static byte[] quotasToData(org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas data) throws IOException
IOException
public static boolean isEmptyQuota(org.apache.hadoop.hbase.protobuf.generated.QuotaProtos.Quotas quotas)
protected static Result doGet(Connection connection, Get get) throws IOException
IOException
protected static Result[] doGet(Connection connection, List<Get> gets) throws IOException
IOException
protected static byte[] getUserRowKey(String user)
protected static byte[] getTableRowKey(TableName table)
protected static byte[] getNamespaceRowKey(String namespace)
protected static byte[] getSettingsQualifierForUserTable(TableName tableName)
protected static byte[] getSettingsQualifierForUserNamespace(String namespace)
protected static String getSettingsQualifierRegexForUserTable(String table)
protected static String getSettingsQualifierRegexForUserNamespace(String namespace)
protected static boolean isNamespaceRowKey(byte[] key)
protected static String getNamespaceFromRowKey(byte[] key)
protected static boolean isTableRowKey(byte[] key)
protected static TableName getTableFromRowKey(byte[] key)
protected static boolean isUserRowKey(byte[] key)
protected static String getUserFromRowKey(byte[] key)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.