Search in sources :

Example 1 with AccumuloStoreFactoryFamily

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;
}
Also used : Serializable(java.io.Serializable) StoreFactoryFamilySpi(mil.nga.giat.geowave.core.store.StoreFactoryFamilySpi) MemoryStoreFactoryFamily(mil.nga.giat.geowave.core.store.memory.MemoryStoreFactoryFamily) MockInstance(org.apache.accumulo.core.client.mock.MockInstance) Instance(org.apache.accumulo.core.client.Instance) MockInstance(org.apache.accumulo.core.client.mock.MockInstance) GeoWaveGTDataStoreFactory(mil.nga.giat.geowave.adapter.vector.plugin.GeoWaveGTDataStoreFactory) DataStore(org.geotools.data.DataStore) GeoWaveGTDataStore(mil.nga.giat.geowave.adapter.vector.plugin.GeoWaveGTDataStore) AccumuloDataStore(mil.nga.giat.geowave.datastore.accumulo.AccumuloDataStore) AccumuloStoreFactoryFamily(mil.nga.giat.geowave.datastore.accumulo.AccumuloStoreFactoryFamily)

Aggregations

Serializable (java.io.Serializable)1 GeoWaveGTDataStore (mil.nga.giat.geowave.adapter.vector.plugin.GeoWaveGTDataStore)1 GeoWaveGTDataStoreFactory (mil.nga.giat.geowave.adapter.vector.plugin.GeoWaveGTDataStoreFactory)1 StoreFactoryFamilySpi (mil.nga.giat.geowave.core.store.StoreFactoryFamilySpi)1 MemoryStoreFactoryFamily (mil.nga.giat.geowave.core.store.memory.MemoryStoreFactoryFamily)1 AccumuloDataStore (mil.nga.giat.geowave.datastore.accumulo.AccumuloDataStore)1 AccumuloStoreFactoryFamily (mil.nga.giat.geowave.datastore.accumulo.AccumuloStoreFactoryFamily)1 Instance (org.apache.accumulo.core.client.Instance)1 MockInstance (org.apache.accumulo.core.client.mock.MockInstance)1 DataStore (org.geotools.data.DataStore)1