@InterfaceAudience.Private @InterfaceStability.Evolving public class MasterQuotaManager extends java.lang.Object implements RegionStateListener
| Constructor and Description |
|---|
MasterQuotaManager(MasterServices masterServices) |
public MasterQuotaManager(MasterServices masterServices)
public void start()
throws java.io.IOException
java.io.IOExceptionpublic void stop()
public boolean isQuotaInitialized()
public MasterProtos.SetQuotaResponse setQuota(MasterProtos.SetQuotaRequest req) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setUserQuota(java.lang.String userName,
MasterProtos.SetQuotaRequest req)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setUserQuota(java.lang.String userName,
TableName table,
MasterProtos.SetQuotaRequest req)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setUserQuota(java.lang.String userName,
java.lang.String namespace,
MasterProtos.SetQuotaRequest req)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setTableQuota(TableName table, MasterProtos.SetQuotaRequest req) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setNamespaceQuota(java.lang.String namespace,
MasterProtos.SetQuotaRequest req)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic void setNamespaceQuota(NamespaceDescriptor desc) throws java.io.IOException
java.io.IOExceptionpublic void removeNamespaceQuota(java.lang.String namespace)
throws java.io.IOException
java.io.IOExceptionpublic void checkNamespaceTableAndRegionQuota(TableName tName, int regions) throws java.io.IOException
java.io.IOExceptionpublic void checkAndUpdateNamespaceRegionQuota(TableName tName, int regions) throws java.io.IOException
java.io.IOExceptionpublic int getRegionCountOfTable(TableName tName) throws java.io.IOException
java.io.IOExceptionpublic void onRegionMerged(HRegionInfo hri) throws java.io.IOException
RegionStateListeneronRegionMerged in interface RegionStateListenerhri - An instance of HRegionInfojava.io.IOExceptionpublic void onRegionSplit(HRegionInfo hri) throws java.io.IOException
RegionStateListeneronRegionSplit in interface RegionStateListenerhri - An instance of HRegionInfojava.io.IOExceptionpublic void removeTableFromNamespaceQuota(TableName tName) throws java.io.IOException
tName - - The table name to update quota usage.java.io.IOException - Signals that an I/O exception has occurred.public NamespaceAuditor getNamespaceQuotaManager()
public void onRegionSplitReverted(HRegionInfo hri) throws java.io.IOException
RegionStateListeneronRegionSplitReverted in interface RegionStateListenerhri - An instance of HRegionInfojava.io.IOException - Signals that an I/O exception has occurred.public void addRegionSize(HRegionInfo hri, long size, long time)
public java.util.Map<HRegionInfo,java.lang.Long> snapshotRegionSizes()