@InterfaceAudience.Private public class SpaceQuotaHelperForTests extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SpaceQuotaHelperForTests.NoFilesToDischarge
Predicate that waits for all store files in a table to have no compacted files.
|
(package private) static class |
SpaceQuotaHelperForTests.SpaceQuotaSnapshotPredicate
Abstraction to simplify the case where a test needs to verify a certain state
on a
SpaceQuotaSnapshot . |
Modifier and Type | Field and Description |
---|---|
private AtomicLong |
counter |
static String |
F1 |
private static org.slf4j.Logger |
LOG |
static long |
ONE_GIGABYTE |
static long |
ONE_KILOBYTE |
static long |
ONE_MEGABYTE |
static int |
SIZE_PER_VALUE |
private org.junit.rules.TestName |
testName |
private HBaseTestingUtility |
testUtil |
Constructor and Description |
---|
SpaceQuotaHelperForTests(HBaseTestingUtility testUtil,
org.junit.rules.TestName testName,
AtomicLong counter) |
Modifier and Type | Method and Description |
---|---|
(package private) org.apache.hadoop.hbase.NamespaceDescriptor |
createNamespace() |
(package private) org.apache.hadoop.hbase.TableName |
createTable() |
(package private) org.apache.hadoop.hbase.TableName |
createTableInNamespace(org.apache.hadoop.hbase.NamespaceDescriptor nd) |
(package private) org.apache.hbase.thirdparty.com.google.common.collect.Multimap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.quotas.QuotaSettings> |
createTablesWithSpaceQuotas() |
(package private) org.apache.hadoop.hbase.TableName |
createTableWithRegions(org.apache.hadoop.hbase.client.Admin admin,
int numRegions) |
(package private) org.apache.hadoop.hbase.TableName |
createTableWithRegions(org.apache.hadoop.hbase.client.Admin admin,
String namespace,
int numRegions) |
(package private) org.apache.hadoop.hbase.TableName |
createTableWithRegions(int numRegions) |
(package private) org.apache.hadoop.hbase.TableName |
createTableWithRegions(String namespace,
int numRegions) |
(package private) org.apache.hadoop.hbase.TableName |
getNextTableName() |
(package private) org.apache.hadoop.hbase.TableName |
getNextTableName(String namespace) |
(package private) org.apache.hadoop.hbase.quotas.QuotaSettings |
getTableSpaceQuota(org.apache.hadoop.hbase.client.Connection conn,
org.apache.hadoop.hbase.TableName tn) |
(package private) long |
listNumDefinedQuotas(org.apache.hadoop.hbase.client.Connection conn)
Returns the number of quotas defined in the HBase quota table.
|
(package private) void |
partitionTablesByQuotaTarget(org.apache.hbase.thirdparty.com.google.common.collect.Multimap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.quotas.QuotaSettings> quotas,
Set<org.apache.hadoop.hbase.TableName> tablesWithTableQuota,
Set<org.apache.hadoop.hbase.TableName> tablesWithNamespaceQuota) |
(package private) void |
removeAllQuotas(org.apache.hadoop.hbase.client.Connection conn)
Removes all quotas defined in the HBase quota table.
|
(package private) static void |
updateConfigForQuotas(org.apache.hadoop.conf.Configuration conf) |
(package private) void |
waitForQuotaTable(org.apache.hadoop.hbase.client.Connection conn)
Waits 30seconds for the HBase quota table to exist.
|
(package private) void |
waitForQuotaTable(org.apache.hadoop.hbase.client.Connection conn,
long timeout)
Waits
timeout milliseconds for the HBase quota table to exist. |
(package private) void |
writeData(org.apache.hadoop.hbase.client.Connection conn,
org.apache.hadoop.hbase.TableName tn,
long sizeInBytes) |
(package private) void |
writeData(org.apache.hadoop.hbase.TableName tn,
long sizeInBytes) |
(package private) void |
writeData(org.apache.hadoop.hbase.TableName tn,
long sizeInBytes,
byte[] qual) |
(package private) void |
writeData(org.apache.hadoop.hbase.TableName tn,
long sizeInBytes,
String qual) |
private static final org.slf4j.Logger LOG
public static final int SIZE_PER_VALUE
public static final String F1
public static final long ONE_KILOBYTE
public static final long ONE_MEGABYTE
public static final long ONE_GIGABYTE
private final HBaseTestingUtility testUtil
private final org.junit.rules.TestName testName
private final AtomicLong counter
public SpaceQuotaHelperForTests(HBaseTestingUtility testUtil, org.junit.rules.TestName testName, AtomicLong counter)
static void updateConfigForQuotas(org.apache.hadoop.conf.Configuration conf)
long listNumDefinedQuotas(org.apache.hadoop.hbase.client.Connection conn) throws IOException
IOException
void removeAllQuotas(org.apache.hadoop.hbase.client.Connection conn) throws IOException, InterruptedException
IOException
InterruptedException
org.apache.hadoop.hbase.quotas.QuotaSettings getTableSpaceQuota(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn) throws IOException
IOException
void waitForQuotaTable(org.apache.hadoop.hbase.client.Connection conn) throws IOException
IOException
void waitForQuotaTable(org.apache.hadoop.hbase.client.Connection conn, long timeout) throws IOException
timeout
milliseconds for the HBase quota table to exist.IOException
void writeData(org.apache.hadoop.hbase.TableName tn, long sizeInBytes) throws IOException
IOException
void writeData(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn, long sizeInBytes) throws IOException
IOException
void writeData(org.apache.hadoop.hbase.TableName tn, long sizeInBytes, String qual) throws IOException
IOException
void writeData(org.apache.hadoop.hbase.TableName tn, long sizeInBytes, byte[] qual) throws IOException
IOException
org.apache.hadoop.hbase.NamespaceDescriptor createNamespace() throws Exception
Exception
org.apache.hbase.thirdparty.com.google.common.collect.Multimap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.quotas.QuotaSettings> createTablesWithSpaceQuotas() throws Exception
Exception
org.apache.hadoop.hbase.TableName getNextTableName()
org.apache.hadoop.hbase.TableName getNextTableName(String namespace)
org.apache.hadoop.hbase.TableName createTable() throws Exception
Exception
org.apache.hadoop.hbase.TableName createTableWithRegions(int numRegions) throws Exception
Exception
org.apache.hadoop.hbase.TableName createTableWithRegions(org.apache.hadoop.hbase.client.Admin admin, int numRegions) throws Exception
Exception
org.apache.hadoop.hbase.TableName createTableWithRegions(String namespace, int numRegions) throws Exception
Exception
org.apache.hadoop.hbase.TableName createTableWithRegions(org.apache.hadoop.hbase.client.Admin admin, String namespace, int numRegions) throws Exception
Exception
org.apache.hadoop.hbase.TableName createTableInNamespace(org.apache.hadoop.hbase.NamespaceDescriptor nd) throws Exception
Exception
void partitionTablesByQuotaTarget(org.apache.hbase.thirdparty.com.google.common.collect.Multimap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.quotas.QuotaSettings> quotas, Set<org.apache.hadoop.hbase.TableName> tablesWithTableQuota, Set<org.apache.hadoop.hbase.TableName> tablesWithNamespaceQuota)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.