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

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

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

import java.io.InputStream;

import com.lordofthejars.nosqlunit.hbase.model.DataSetParser;
import com.lordofthejars.nosqlunit.hbase.model.JsonDataSetParser;
import com.lordofthejars.nosqlunit.hbase.model.ParsedDataModel;

public class DefaultHBaseInsertionStrategy implements HBaseInsertionStrategy {

	@Override
	public void insert(HBaseConnectionCallback connection, InputStream dataset) throws Throwable {
		DataSetParser dataSetParser = new JsonDataSetParser();
		ParsedDataModel parsedDataset = dataSetParser.parse(dataset);
		
		DataLoader dataLoader = new DataLoader(connection.configuration());
		dataLoader.load(parsedDataset);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy