public String getNamespace() { return IndexPluginOptions.getIndexNamespace(getPluginName()); }
public String getNamespace() { return IndexPluginOptions.getIndexNamespace(getPluginName()); }
public String getNamespace() { return IndexPluginOptions.getIndexNamespace(getPluginName()); }
private static IndexPluginOptions loadIndexPluginOptions( final Properties props, final String name) { final IndexPluginOptions indexPlugin = new IndexPluginOptions(); final String indexNamespace = IndexPluginOptions.getIndexNamespace(name); if (!indexPlugin.load(props, indexNamespace)) { return null; } return indexPlugin; }
@Override public String computeResults(final OperationParams params) throws Exception { pattern = IndexPluginOptions.getIndexNamespace(getEntryName()); return super.computeResults(params, pattern); } }
@Override public boolean prepare(OperationParams params) { super.prepare(params); Properties existingProps = getGeoWaveConfigProperties(params); // Load the old index, so that we can override the values String oldIndex = null; if (parameters.size() >= 1) { oldIndex = parameters.get(0); if (!newPluginOptions.load(existingProps, IndexPluginOptions.getIndexNamespace(oldIndex))) { throw new ParameterException("Could not find index: " + oldIndex); } } // Successfully prepared. return true; }
@Override public void execute(OperationParams params) { Properties existingProps = getGeoWaveConfigProperties(params); if (parameters.size() < 2) { throw new ParameterException("Must specify <existing index> <new index> names"); } // This is the new index name. String newIndex = parameters.get(1); String newIndexNamespace = IndexPluginOptions.getIndexNamespace(newIndex); // Make sure we're not already in the index. IndexPluginOptions existPlugin = new IndexPluginOptions(); if (existPlugin.load(existingProps, newIndexNamespace)) { throw new ParameterException("That index already exists: " + newIndex); } // Save the options. newPluginOptions.save(existingProps, newIndexNamespace); // Make default? if (Boolean.TRUE.equals(makeDefault)) { existingProps.setProperty(IndexPluginOptions.DEFAULT_PROPERTY_NAMESPACE, newIndex); } // Write properties file ConfigOptions.writeProperties(getGeoWaveConfigFile(params), existingProps); }
indexes[i] = indexes[i].trim(); final IndexPluginOptions options = new IndexPluginOptions(); if (!options.load(existingProps, IndexPluginOptions.getIndexNamespace(indexes[i]))) { throw new TargetNotFoundException("That index does not exist: " + indexes[i]);
if (pluginOptions.load( existingProps, IndexPluginOptions.getIndexNamespace(defaultIndex))) {
final IndexPluginOptions pluginOptions = new IndexPluginOptions(); pluginOptions.selectPlugin(indexType); pluginOptions.save(props, IndexPluginOptions.getIndexNamespace(indexType)); final AddIndexCommand addIndex = new AddIndexCommand(); addIndex.setParameters(indexType);