@InterfaceAudience.Private public class NamespaceAuditor extends 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(RegionInfo hri) |
void |
checkQuotaToUpdateRegion(TableName tName,
int regions)
Check and update region count quota for an existing table.
|
void |
deleteNamespace(String namespace) |
int |
getRegionCountOfTable(TableName tName)
Get region count for table
|
org.apache.hadoop.hbase.namespace.NamespaceTableAndRegionInfo |
getState(String namespace) |
boolean |
isInitialized()
Checks if namespace auditor is initialized.
|
void |
removeFromNamespaceUsage(TableName tableName) |
void |
removeRegionFromNamespaceUsage(RegionInfo hri) |
void |
start() |
void |
updateQuotaForRegionMerge(RegionInfo mergedRegion) |
public NamespaceAuditor(MasterServices masterServices)
public void start() throws IOException
IOException
public void checkQuotaToCreateTable(TableName tName, int regions) throws IOException
tName
- - The table name to check quota.regions
- - Number of regions that will be added.IOException
- Signals that an I/O exception has occurred.public void checkQuotaToUpdateRegion(TableName tName, int regions) throws IOException
tName
- - table name for which region count to be updated.regions
- - Number of regions that will be added.IOException
- Signals that an I/O exception has occurred.public int getRegionCountOfTable(TableName tName) throws IOException
tName
- - table nameIOException
- Signals that the namespace auditor has not been initializedpublic void checkQuotaToSplitRegion(RegionInfo hri) throws IOException
IOException
public void updateQuotaForRegionMerge(RegionInfo mergedRegion) throws IOException
IOException
public void addNamespace(NamespaceDescriptor ns) throws IOException
IOException
public void deleteNamespace(String namespace) throws IOException
IOException
public void removeFromNamespaceUsage(TableName tableName) throws IOException
IOException
public void removeRegionFromNamespaceUsage(RegionInfo hri) throws IOException
IOException
public org.apache.hadoop.hbase.namespace.NamespaceTableAndRegionInfo getState(String namespace)
namespace
- The name of the namespacepublic boolean isInitialized()
Copyright © 2007–2019 Cloudera. All rights reserved.