use of mil.nga.giat.geowave.datastore.accumulo.AccumuloStoreFactoryFamily in project incubator-rya by apache.
the class GeoWaveGeoIndexer method createDataStore.
/**
* Creates the {@link DataStore} for the {@link GeoWaveGeoIndexer}.
* @param conf the {@link Configuration}.
* @return the {@link DataStore}.
*/
public DataStore createDataStore(final Configuration conf) throws IOException, GeoWavePluginException {
final Map<String, Serializable> params = getParams(conf);
final Instance instance = ConfigUtils.getInstance(conf);
final boolean useMock = instance instanceof MockInstance;
final StoreFactoryFamilySpi storeFactoryFamily;
if (useMock) {
storeFactoryFamily = new MemoryStoreFactoryFamily();
} else {
storeFactoryFamily = new AccumuloStoreFactoryFamily();
}
final GeoWaveGTDataStoreFactory geoWaveGTDataStoreFactory = new GeoWaveGTDataStoreFactory(storeFactoryFamily);
final DataStore dataStore = geoWaveGTDataStoreFactory.createNewDataStore(params);
return dataStore;
}
Aggregations