Class MiniClusterRule

java.lang.Object
org.junit.rules.ExternalResource
org.apache.hadoop.hbase.MiniClusterRule
All Implemented Interfaces:
org.junit.rules.TestRule

public final class MiniClusterRule extends org.junit.rules.ExternalResource
A TestRule that manages an instance of the MiniHBaseCluster. Can be used in either the Rule or ClassRule positions. Built on top of an instance of HBaseTestingUtility, 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);
   }
 }