Package org.apache.hadoop.hbase.quotas
Class SpaceQuotaHelperForTests.SpaceQuotaSnapshotPredicate
java.lang.Object
org.apache.hadoop.hbase.quotas.SpaceQuotaHelperForTests.SpaceQuotaSnapshotPredicate
- All Implemented Interfaces:
Waiter.Predicate<Exception>
- Enclosing class:
- SpaceQuotaHelperForTests
abstract static class SpaceQuotaHelperForTests.SpaceQuotaSnapshotPredicate
extends Object
implements Waiter.Predicate<Exception>
Abstraction to simplify the case where a test needs to verify a certain state on a
SpaceQuotaSnapshot
. This class fails-fast when there is no such snapshot obtained from
the Master. As such, it is not useful to verify the lack of a snapshot.-
Field Summary
-
Constructor Summary
ConstructorDescriptionSpaceQuotaSnapshotPredicate
(org.apache.hadoop.hbase.client.Connection conn, String ns) SpaceQuotaSnapshotPredicate
(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn) SpaceQuotaSnapshotPredicate
(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn, String ns) -
Method Summary
-
Field Details
-
conn
-
tn
-
ns
-
-
Constructor Details
-
SpaceQuotaSnapshotPredicate
SpaceQuotaSnapshotPredicate(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn) -
SpaceQuotaSnapshotPredicate
SpaceQuotaSnapshotPredicate(org.apache.hadoop.hbase.client.Connection conn, String ns) -
SpaceQuotaSnapshotPredicate
SpaceQuotaSnapshotPredicate(org.apache.hadoop.hbase.client.Connection conn, org.apache.hadoop.hbase.TableName tn, String ns)
-
-
Method Details
-
evaluate
Description copied from interface:Waiter.Predicate
Perform a predicate evaluation.- Specified by:
evaluate
in interfaceWaiter.Predicate<Exception>
- Returns:
- the boolean result of the evaluation.
- Throws:
Exception
-
evaluate
abstract boolean evaluate(org.apache.hadoop.hbase.quotas.SpaceQuotaSnapshot snapshot) throws Exception Must determine if the givenSpaceQuotaSnapshot
meets some criteria.- Parameters:
snapshot
- a non-null snapshot obtained from the HBase Master- Returns:
- true if the criteria is met, false otherwise
- Throws:
Exception
-