@InterfaceAudience.Private public class NamespaceAuditor extends Object
| Constructor and Description |
|---|
NamespaceAuditor(MasterServices masterServices) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamespace(org.apache.hadoop.hbase.NamespaceDescriptor ns) |
void |
checkQuotaToCreateTable(org.apache.hadoop.hbase.TableName tName,
int regions)
Check quota to create table.
|
void |
checkQuotaToSplitRegion(org.apache.hadoop.hbase.client.RegionInfo hri) |
void |
checkQuotaToUpdateRegion(org.apache.hadoop.hbase.TableName tName,
int regions)
Check and update region count quota for an existing table.
|
void |
deleteNamespace(String namespace) |
int |
getRegionCountOfTable(org.apache.hadoop.hbase.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(org.apache.hadoop.hbase.TableName tableName) |
void |
removeRegionFromNamespaceUsage(org.apache.hadoop.hbase.client.RegionInfo hri) |
void |
start() |
void |
updateQuotaForRegionMerge(org.apache.hadoop.hbase.client.RegionInfo mergedRegion) |
public NamespaceAuditor(MasterServices masterServices)
public void start()
throws IOException
IOExceptionpublic void checkQuotaToCreateTable(org.apache.hadoop.hbase.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(org.apache.hadoop.hbase.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(org.apache.hadoop.hbase.TableName tName)
throws IOException
tName - - table nameIOException - Signals that the namespace auditor has not been initializedpublic void checkQuotaToSplitRegion(org.apache.hadoop.hbase.client.RegionInfo hri)
throws IOException
IOExceptionpublic void updateQuotaForRegionMerge(org.apache.hadoop.hbase.client.RegionInfo mergedRegion)
throws IOException
IOExceptionpublic void addNamespace(org.apache.hadoop.hbase.NamespaceDescriptor ns)
throws IOException
IOExceptionpublic void deleteNamespace(String namespace) throws IOException
IOExceptionpublic void removeFromNamespaceUsage(org.apache.hadoop.hbase.TableName tableName)
throws IOException
IOExceptionpublic void removeRegionFromNamespaceUsage(org.apache.hadoop.hbase.client.RegionInfo hri)
throws IOException
IOExceptionpublic org.apache.hadoop.hbase.namespace.NamespaceTableAndRegionInfo getState(String namespace)
namespace - The name of the namespacepublic boolean isInitialized()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.