@InterfaceAudience.Private public class NamespaceAuditor extends java.lang.Object
| Constructor and Description |
|---|
NamespaceAuditor(MasterServices masterServices) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamespace(NamespaceDescriptor ns) |
void |
checkQuotaToCreateTable(TableName tName,
int regions)
Check quota to create table.
|
void |
checkQuotaToSplitRegion(HRegionInfo hri) |
void |
checkQuotaToUpdateRegion(TableName tName,
int regions)
Check and update region count quota for an existing table.
|
void |
deleteNamespace(java.lang.String namespace) |
int |
getRegionCountOfTable(TableName tName)
Get region count for table
|
boolean |
isInitialized()
Checks if namespace auditor is initialized.
|
void |
removeFromNamespaceUsage(TableName tableName) |
void |
removeRegionFromNamespaceUsage(HRegionInfo hri) |
void |
start() |
void |
updateQuotaForRegionMerge(HRegionInfo hri) |
public NamespaceAuditor(MasterServices masterServices)
public void start()
throws java.io.IOException
java.io.IOExceptionpublic void checkQuotaToCreateTable(TableName tName, int regions) throws java.io.IOException
tName - - The table name to check quota.regions - - Number of regions that will be added.java.io.IOException - Signals that an I/O exception has occurred.public void checkQuotaToUpdateRegion(TableName tName, int regions) throws java.io.IOException
tName - - table name for which region count to be updated.regions - - Number of regions that will be added.java.io.IOException - Signals that an I/O exception has occurred.public int getRegionCountOfTable(TableName tName) throws java.io.IOException
tName - - table namejava.io.IOException - Signals that the namespace auditor has not been initializedpublic void checkQuotaToSplitRegion(HRegionInfo hri) throws java.io.IOException
java.io.IOExceptionpublic void updateQuotaForRegionMerge(HRegionInfo hri) throws java.io.IOException
java.io.IOExceptionpublic void addNamespace(NamespaceDescriptor ns) throws java.io.IOException
java.io.IOExceptionpublic void deleteNamespace(java.lang.String namespace)
throws java.io.IOException
java.io.IOExceptionpublic void removeFromNamespaceUsage(TableName tableName) throws java.io.IOException
java.io.IOExceptionpublic void removeRegionFromNamespaceUsage(HRegionInfo hri) throws java.io.IOException
java.io.IOExceptionpublic boolean isInitialized()