public DataStore createDataStore() { return dataStorePlugin.createDataStore(); }
/** * Create a data store given that particular datastore implementation's options. The options * usually define connection parameters as well as other useful configuration particular to that * datastore. * * @param requiredOptions the options for the desired data store * @return the data store */ public static DataStore createDataStore(final StoreFactoryOptions requiredOptions) { return new DataStorePluginOptions(requiredOptions).createDataStore(); } }
public boolean runOperation() { final DataStore dataStore = storeOptions.createDataStore();
private ArrayList<DataAdapterInfo> getStoreAdapterInfo( final String storeName, final String adapterId) { final DataStorePluginOptions dsPlugin = getStorePlugin(storeName); final DataStore dataStore = dsPlugin.createDataStore(); final ArrayList<DataAdapterInfo> adapterInfoList = new ArrayList<>(); LOGGER.debug("Adapter list for " + storeName + " with adapterId = " + adapterId + ": "); for (final DataTypeAdapter<?> adapter : dataStore.getTypes()) { final DataAdapterInfo info = getAdapterInfo(adapterId, adapter); if (info != null) { adapterInfoList.add(info); LOGGER.debug("> '" + info.typeName + "' adapter passed filter"); } } LOGGER.debug("getStoreAdapterInfo(" + storeName + ") got " + adapterInfoList.size() + " ids"); if (dataStore instanceof Closeable) { try { ((Closeable) dataStore).close(); } catch (final IOException e) { LOGGER.error("Unable to close datastore"); } } return adapterInfoList; }
public static void deleteAll(final DataStorePluginOptions dataStore) { dataStore.createDataStore().delete(QueryBuilder.newBuilder().build()); }
final DataStore dataStore = storeOptions.createDataStore(); try (LocalIngestRunData runData = new LocalIngestRunData(adapters, dataStore)) {
protected void setup( final Job job, final String namespace, final DataTypeAdapter<?> adapter, final Index index) throws IOException, MismatchedIndexToAdapterMapping { GeoWaveOutputFormat.setStoreOptions(job.getConfiguration(), outputDataStoreOptions); GeoWaveOutputFormat.addDataAdapter(job.getConfiguration(), adapter); GeoWaveOutputFormat.addIndex(job.getConfiguration(), index); final DataStore dataStore = outputDataStoreOptions.createDataStore(); dataStore.addType(adapter, index); final Writer writer = dataStore.createWriter(adapter.getTypeName()); writer.close(); }
public static void setStoreOptions( final Configuration config, final DataStorePluginOptions storeOptions) { if (storeOptions != null) { GeoWaveConfiguratorBase.setStoreOptionsMap(CLASS, config, storeOptions.getOptionsAsMap()); final DataStore dataStore = storeOptions.createDataStore(); if ((dataStore != null) && (dataStore instanceof MapReduceDataStore)) { ((MapReduceDataStore) dataStore).prepareRecordWriter(config); } } else { GeoWaveConfiguratorBase.setStoreOptionsMap(CLASS, config, null); } }
store = dataStorePluginOptions.createDataStore();
store = dataStorePluginOptions.createDataStore();
@Override public Void computeResults(final OperationParams params) { // Ensure we have all the required arguments if (parameters.size() != 2) { throw new ParameterException("Requires arguments: <store name> <type name>"); } final String inputStoreName = parameters.get(0); final String typeName = parameters.get(1); // Attempt to load store. final File configFile = getGeoWaveConfigFile(params); final StoreLoader inputStoreLoader = new StoreLoader(inputStoreName); if (!inputStoreLoader.loadFromConfig(configFile)) { throw new ParameterException("Cannot find store name: " + inputStoreLoader.getStoreName()); } inputStoreOptions = inputStoreLoader.getDataStorePlugin(); LOGGER.info("Deleting everything in store: " + inputStoreName + " with type name: " + typeName); inputStoreOptions.createDataStore().delete( QueryBuilder.newBuilder().addTypeName(typeName).build()); return null; } }
@Override public Void computeResults(final OperationParams params) { if (parameters.size() < 1) { throw new ParameterException("Must specify store name"); } final String inputStoreName = parameters.get(0); // Attempt to load store. final File configFile = getGeoWaveConfigFile(params); // Attempt to load input store. final StoreLoader inputStoreLoader = new StoreLoader(inputStoreName); if (!inputStoreLoader.loadFromConfig(configFile)) { throw new ParameterException("Cannot find store name: " + inputStoreLoader.getStoreName()); } inputStoreOptions = inputStoreLoader.getDataStorePlugin(); LOGGER.info("Deleting everything in store: " + inputStoreName); inputStoreOptions.createDataStore().delete(QueryBuilder.newBuilder().build()); return null; } }
final DataStore featureStore = outputDataStore.createDataStore(); final Index featureIndex = new SpatialDimensionalityTypeProvider().createIndex(new SpatialOptions());
final DataStore store = storeOptions.createDataStore();
vectorStore = vectorStoreOptions.createDataStore(); } else { vectorStore = store;
vectorStore = vectorStoreOptions.createDataStore(); } else { vectorStore = store;
final DataStore dataStore = storeOptions.createDataStore(); if (!(dataStore instanceof BaseDataStore)) { LOGGER.warn(
final DataStore dataStore = storeOptions.createDataStore(); if (!(dataStore instanceof BaseDataStore)) { LOGGER.warn(
final DataStore featureStore = outputDataStore.createDataStore(); final Index featureIndex = new SpatialDimensionalityTypeProvider().createIndex(new SpatialOptions());
final DataStore featureStore = outputDataStore.createDataStore(); final Index featureIndex = new SpatialDimensionalityTypeProvider().createIndex(new SpatialOptions());