@InterfaceAudience.Private @InterfaceStability.Evolving public class MasterQuotaManager extends Object implements RegionStateListener
Constructor and Description |
---|
MasterQuotaManager(MasterServices masterServices) |
Modifier and Type | Method and Description |
---|---|
void |
checkAndUpdateNamespaceRegionQuota(TableName tName,
int regions) |
void |
checkNamespaceTableAndRegionQuota(TableName tName,
int regions) |
NamespaceAuditor |
getNamespaceQuotaManager() |
int |
getRegionCountOfTable(TableName tName) |
boolean |
isQuotaInitialized() |
void |
onRegionMerged(HRegionInfo hri)
Process region merge event.
|
void |
onRegionSplit(HRegionInfo hri)
Process region split event.
|
void |
onRegionSplitReverted(HRegionInfo hri)
Process region split reverted event.
|
void |
removeNamespaceQuota(String namespace) |
void |
removeTableFromNamespaceQuota(TableName tName)
Remove table from namespace quota.
|
void |
setNamespaceQuota(NamespaceDescriptor desc) |
void |
setNamespaceQuota(String namespace,
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaResponse |
setQuota(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
void |
setTableQuota(TableName table,
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
void |
setUserQuota(String userName,
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
void |
setUserQuota(String userName,
String namespace,
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
void |
setUserQuota(String userName,
TableName table,
org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) |
void |
start() |
void |
stop() |
public MasterQuotaManager(MasterServices masterServices)
public void start() throws IOException
IOException
public void stop()
public boolean isQuotaInitialized()
public org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaResponse setQuota(org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setUserQuota(String userName, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setUserQuota(String userName, TableName table, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setUserQuota(String userName, String namespace, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setTableQuota(TableName table, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setNamespaceQuota(String namespace, org.apache.hadoop.hbase.protobuf.generated.MasterProtos.SetQuotaRequest req) throws IOException, InterruptedException
IOException
InterruptedException
public void setNamespaceQuota(NamespaceDescriptor desc) throws IOException
IOException
public void removeNamespaceQuota(String namespace) throws IOException
IOException
public void checkNamespaceTableAndRegionQuota(TableName tName, int regions) throws IOException
IOException
public void checkAndUpdateNamespaceRegionQuota(TableName tName, int regions) throws IOException
IOException
public int getRegionCountOfTable(TableName tName) throws IOException
IOException
public void onRegionMerged(HRegionInfo hri) throws IOException
RegionStateListener
onRegionMerged
in interface RegionStateListener
hri
- An instance of HRegionInfoIOException
public void onRegionSplit(HRegionInfo hri) throws IOException
RegionStateListener
onRegionSplit
in interface RegionStateListener
hri
- An instance of HRegionInfoIOException
public void removeTableFromNamespaceQuota(TableName tName) throws IOException
tName
- - The table name to update quota usage.IOException
- Signals that an I/O exception has occurred.public NamespaceAuditor getNamespaceQuotaManager()
public void onRegionSplitReverted(HRegionInfo hri) throws IOException
RegionStateListener
onRegionSplitReverted
in interface RegionStateListener
hri
- An instance of HRegionInfoIOException
- Signals that an I/O exception has occurred.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.