Class SpaceQuotaHelperForTests

java.lang.Object
org.apache.hadoop.hbase.quotas.SpaceQuotaHelperForTests

@Private public class SpaceQuotaHelperForTests extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static class 
    Predicate that waits for all store files in a table to have no compacted files.
    (package private) static class 
    Abstraction to simplify the case where a test needs to verify a certain state on a SpaceQuotaSnapshot.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final AtomicLong
     
    static final String
     
    private static final org.slf4j.Logger
     
    private static final int
     
    static final long
     
    static final long
     
    static final long
     
    static final int
     
    private final org.junit.rules.TestName
     
    private final HBaseTestingUtil
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpaceQuotaHelperForTests(HBaseTestingUtil testUtil, org.junit.rules.TestName testName, AtomicLong counter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) org.apache.hadoop.hbase.NamespaceDescriptor
     
    (package private) org.apache.hadoop.hbase.NamespaceDescriptor
     
    (package private) org.apache.hadoop.hbase.TableName
     
    (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>
     
    (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
    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, int numberOfReplicas)
     
    (package private) Map<byte[],List<org.apache.hadoop.fs.Path>>
    generateFileToLoad(org.apache.hadoop.hbase.TableName tn, int numFiles, int numRowsPerFile)
    Bulk-loads a number of files with a number of rows to the given table.
    (package private) org.apache.hadoop.hbase.TableName
     
    (package private) org.apache.hadoop.hbase.TableName
     
    (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
    Removes all quotas defined in the HBase quota table.
    (package private) void
    removeAllQuotas(org.apache.hadoop.hbase.client.Connection conn)
    Removes all quotas defined in the HBase quota table.
    (package private) void
    Removes the space quota from the given namespace
    (package private) void
    removeQuotaFromtable(org.apache.hadoop.hbase.TableName tn)
    Removes the space quota from the given table
    (package private) void
    setQuotaLimit(String ns, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policy, long sizeInMBs)
    Sets the given quota (policy & limit) on the passed namespace.
    (package private) void
    setQuotaLimit(org.apache.hadoop.hbase.TableName tn, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policy, long sizeInMBs)
    Sets the given quota (policy & limit) on the passed table.
    (package private) static void
    updateConfigForQuotas(org.apache.hadoop.conf.Configuration conf)
     
    (package private) void
    verifyNoViolation(org.apache.hadoop.hbase.TableName tn, org.apache.hadoop.hbase.client.Mutation m)
    Verifies that no policy has been violated on the given table
    (package private) void
    verifyTableUsageSnapshotForSpaceQuotaExist(org.apache.hadoop.hbase.TableName tn)
    Verifies that table usage snapshot exists for the table
    (package private) void
    verifyViolation(org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policyToViolate, org.apache.hadoop.hbase.TableName tn, org.apache.hadoop.hbase.client.Mutation m)
    Verifies that the given policy on the given table has been violated
    (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)
     
    (package private) org.apache.hadoop.hbase.TableName
    writeUntilViolation(org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policyToViolate)
    Writes the given mutation into a table until it violates the given policy.
    (package private) org.apache.hadoop.hbase.TableName
    writeUntilViolationAndVerifyViolation(org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policyToViolate, org.apache.hadoop.hbase.client.Mutation m)
    Writes the given mutation into a table until it violates the given policy.
    (package private) org.apache.hadoop.hbase.TableName
    writeUntilViolationAndVerifyViolationInNamespace(String ns, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policyToViolate, org.apache.hadoop.hbase.client.Mutation m)
     
    (package private) org.apache.hadoop.hbase.TableName
    writeUntilViolationInNamespace(String ns, org.apache.hadoop.hbase.quotas.SpaceViolationPolicy policyToViolate)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait