All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lordofthejars.nosqlunit.hbase.EmbeddedHBaseStarter Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.lordofthejars.nosqlunit.hbase;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseTestingUtility;

public class EmbeddedHBaseStarter {

	private HBaseTestingUtility testUtil;
	
	public HBaseTestingUtility startSingleMiniCluster(Configuration configuration) throws Exception {
		testUtil = new HBaseTestingUtility(configuration);
		testUtil.startMiniCluster(1);
		
		return testUtil;
	}
	
	public void stopMiniCluster() {
		if(testUtil != null) {
			try {
				testUtil.shutdownMiniCluster();
			} catch (Exception e) {
				throw new IllegalStateException(e);
			}
		}
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy