Package org.apache.hadoop.hbase.quotas
Class QuotaRetriever
java.lang.Object
org.apache.hadoop.hbase.quotas.QuotaRetriever
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<QuotaSettings>
Scanner to iterate over the quota settings.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Queue<QuotaSettings>private ConnectionConnection to use.private booleanShould QutoaRetriever manage the state of the connection, or leave it be.private static final org.slf4j.Loggerprivate ResultScannerprivate Table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()(package private) void(package private) voidinit(Connection conn, Scan scan) iterator()next()static QuotaRetrieveropen(org.apache.hadoop.conf.Configuration conf) Open a QuotaRetriever with no filter, all the quota settings will be returned.static QuotaRetrieveropen(org.apache.hadoop.conf.Configuration conf, QuotaFilter filter) Open a QuotaRetriever with the specified filter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
LOG
-
cache
-
scanner
-
connection
Connection to use. Could pass one in and have this class use it but this class wants to be standalone. -
table
-
isManagedConnection
Should QutoaRetriever manage the state of the connection, or leave it be.
-
-
Constructor Details
-
QuotaRetriever
-
-
Method Details
-
init
- Throws:
IOException
-
init
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
next
- Throws:
IOException
-
iterator
- Specified by:
iteratorin interfaceIterable<QuotaSettings>
-
open
Open a QuotaRetriever with no filter, all the quota settings will be returned.- Parameters:
conf- Configuration object to use.- Returns:
- the QuotaRetriever
- Throws:
IOException- if a remote or network exception occurs
-
open
public static QuotaRetriever open(org.apache.hadoop.conf.Configuration conf, QuotaFilter filter) throws IOException Open a QuotaRetriever with the specified filter.- Parameters:
conf- Configuration object to use.filter- the QuotaFilter- Returns:
- the QuotaRetriever
- Throws:
IOException- if a remote or network exception occurs
-