public DataStorePluginOptions createPluginOptions() { return new DataStorePluginOptions(this); }
/** * 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 static DataStorePluginOptions getStoreOptions( final Class<?> implementingClass, final JobContext context) { final Map<String, String> options = getStoreOptionsMapInternal(implementingClass, getConfiguration(context)); try { return new DataStorePluginOptions(options); } catch (final IllegalArgumentException e) { LOGGER.warn("Unable to get data store options from job context", e); return null; } }
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
final File configFile) { dataStorePlugin = new DataStorePluginOptions();
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
@Override public void execute(OperationParams params) { Properties existingProps = getGeoWaveConfigProperties(params); if (parameters.size() < 2) { throw new ParameterException("Must specify <existing store> <new store> names"); } // This is the new store name. String newStore = parameters.get(1); String newStoreNamespace = DataStorePluginOptions.getStoreNamespace(newStore); // Make sure we're not already in the index. DataStorePluginOptions existPlugin = new DataStorePluginOptions(); if (existPlugin.load(existingProps, newStoreNamespace)) { throw new ParameterException("That store already exists: " + newStore); } // Save the options. newPluginOptions.save(existingProps, newStoreNamespace); // Make default? if (Boolean.TRUE.equals(makeDefault)) { existingProps.setProperty(DataStorePluginOptions.DEFAULT_PROPERTY_NAMESPACE, newStore); } // Write properties file ConfigOptions.writeProperties(getGeoWaveConfigFile(params), existingProps); }
public static void main(final String[] args) throws Exception { final OSMIngestCommandArgs ingestArgs = new OSMIngestCommandArgs(); final DataStorePluginOptions opts = new DataStorePluginOptions(); opts.selectPlugin(new AccumuloStoreFactoryFamily().getType()); final OperationParser parser = new OperationParser(); parser.addAdditionalObject(ingestArgs); parser.addAdditionalObject(opts); final CommandLineOperationParams params = parser.parse(args); if (params.getSuccessCode() == 0) { final OSMConversionRunner runner = new OSMConversionRunner(ingestArgs, opts); final int res = ToolRunner.run(new Configuration(), runner, args); System.exit(res); } System.out.println(params.getSuccessMessage()); System.exit(params.getSuccessCode()); }
DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new ParameterException("That store already exists: " + getPluginName());
public static void main(final String[] args) throws Exception { final OSMIngestCommandArgs argv = new OSMIngestCommandArgs(); final DataStorePluginOptions opts = new DataStorePluginOptions(); opts.selectPlugin(new AccumuloStoreFactoryFamily().getType()); final OperationParser parser = new OperationParser(); parser.addAdditionalObject(argv); parser.addAdditionalObject(opts); final CommandLineOperationParams params = parser.parse(args); if (params.getSuccessCode() == 0) { final OSMRunner runner = new OSMRunner(argv, opts); final int res = ToolRunner.run(new Configuration(), runner, args); System.exit(res); } System.out.println(params.getSuccessMessage()); System.exit(params.getSuccessCode()); }
final DataStorePluginOptions existingOptions = new DataStorePluginOptions(); if (existingOptions.load(existingProps, getNamespace())) { throw new DuplicateEntryException("That store already exists: " + getPluginName());
configOptions); options.setGeoWaveNamespace(outputDataStoreOptions.getGeoWaveNamespace() + "_tmp"); outputDataStoreOptions = new DataStorePluginOptions(options); kdeCoverageName = kdeCommandLineOptions.getCoverageName() + TMP_COVERAGE_SUFFIX; } else {