Package org.apache.hadoop.hbase
Class MiniClusterRule
java.lang.Object
org.junit.rules.ExternalResource
org.apache.hadoop.hbase.MiniClusterRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Deprecated.
A
TestRule that manages an instance of the SingleProcessHBaseCluster. Can be used
in either the Rule or ClassRule positions. Built on top of an instance of
HBaseTestingUtil, so be weary of intermixing direct use of that class with this Rule.
Use in combination with ConnectionRule, for example:
{
@code
public class TestMyClass {
@ClassRule
public static final MiniClusterRule miniClusterRule = MiniClusterRule.newBuilder().build();
@Rule
public final ConnectionRule connectionRule =
ConnectionRule.createAsyncConnectionRule(miniClusterRule::createAsyncConnection);
}
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.A builder for fluent composition of a newMiniClusterRule. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SingleProcessHBaseClusterDeprecated.private final StartTestingClusterOptionDeprecated.private final HBaseTestingUtilDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMiniClusterRule(org.apache.hadoop.conf.Configuration conf, StartTestingClusterOption miniClusterOptions) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafter()Deprecated.protected voidbefore()Deprecated.CompletableFuture<org.apache.hadoop.hbase.client.AsyncConnection>Deprecated.Create aAsyncConnectionto the managedSingleProcessHBaseCluster.org.apache.hadoop.hbase.client.ConnectionDeprecated.Create aConnectionto the managedSingleProcessHBaseCluster.Deprecated.Returns the underlying instance ofHBaseTestingUtilstatic MiniClusterRule.BuilderDeprecated.Methods inherited from class org.junit.rules.ExternalResource
apply
-
Field Details
-
testingUtility
Deprecated. -
miniClusterOptions
Deprecated. -
miniCluster
Deprecated.
-
-
Constructor Details
-
MiniClusterRule
private MiniClusterRule(org.apache.hadoop.conf.Configuration conf, StartTestingClusterOption miniClusterOptions) Deprecated.
-
-
Method Details
-
newBuilder
Deprecated. -
getTestingUtility
Deprecated.Returns the underlying instance ofHBaseTestingUtil -
createConnection
Deprecated.Create aConnectionto the managedSingleProcessHBaseCluster. It's up to the caller toclose()the connection when finished. -
createAsyncConnection
Deprecated.Create aAsyncConnectionto the managedSingleProcessHBaseCluster. It's up to the caller toclose()the connection when finished. -
before
Deprecated.- Overrides:
beforein classorg.junit.rules.ExternalResource- Throws:
Throwable
-
after
Deprecated.- Overrides:
afterin classorg.junit.rules.ExternalResource
-
MiniClusterExtensioninstead, Once we finish the migration of JUnit5, which means we do not needMiniClusterRuleany more, we can remove these dependencies, see HBASE-23671 for more details.