Package org.apache.hadoop.hbase.client
Class TestMetaCache.RoundRobinExceptionInjector
java.lang.Object
org.apache.hadoop.hbase.client.TestMetaCache.ExceptionInjector
org.apache.hadoop.hbase.client.TestMetaCache.RoundRobinExceptionInjector
- Enclosing class:
- TestMetaCache
public static class TestMetaCache.RoundRobinExceptionInjector
extends TestMetaCache.ExceptionInjector
Rotates through the possible cache clearing and non-cache clearing exceptions for requests.
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
throwOnGet
(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest request) void
throwOnMutate
(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest request) void
throwOnScan
(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest request) private void
throwSomeExceptions
(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier regionSpec) Throw some exceptions.Methods inherited from class org.apache.hadoop.hbase.client.TestMetaCache.ExceptionInjector
isTestTable
-
Field Details
-
numReqs
-
expCount
-
metaCachePreservingExceptions
-
-
Constructor Details
-
RoundRobinExceptionInjector
public RoundRobinExceptionInjector()
-
-
Method Details
-
throwOnGet
public void throwOnGet(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
throwOnGet
in classTestMetaCache.ExceptionInjector
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
throwOnMutate
public void throwOnMutate(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
throwOnMutate
in classTestMetaCache.ExceptionInjector
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
throwOnScan
public void throwOnScan(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
throwOnScan
in classTestMetaCache.ExceptionInjector
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
throwSomeExceptions
private void throwSomeExceptions(TestMetaCache.FakeRSRpcServices rpcServices, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier regionSpec) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException Throw some exceptions. Mostly throw exceptions which do not clear meta cache. Periodically throw NotSevingRegionException which clears the meta cache.- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-