Github user pujav65 commented on a diff in the pull request:
https://github.com/apache/incubator-rya/pull/182#discussion_r129997683
--- Diff:
extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/GeoEnabledFilterFunctionOptimizer.java
---
@@ -98,18 +96,23 @@ public void setConf(final Configuration conf) {
init = false;
init();
}
-
+ /**
+ * Load instances of the selected indexers. This is tricky because
some (geomesa vs geowave) have incompatible dependencies (geotools versions).
+ */
private synchronized void init() {
if (!init) {
- if (ConfigUtils.getUseMongo(conf)) {
- geoIndexer = new MongoGeoIndexer();
- geoIndexer.setConf(conf);
- freeTextIndexer = new MongoFreeTextIndexer();
- freeTextIndexer.setConf(conf);
- temporalIndexer = new MongoTemporalIndexer();
- temporalIndexer.setConf(conf);
+ if (ConfigUtils.getUseMongo(conf)) {
+ // create a new MongoGeoIndexer() without
having it at compile time.
+ geoIndexer =
instantiate(GeoIndexerType.MONGO_DB.getGeoIndexerClassString(),
GeoIndexer.class);
+ geoIndexer.setConf(conf);
+ freeTextIndexer = new MongoFreeTextIndexer();
+ freeTextIndexer.setConf(conf);
+ temporalIndexer = new MongoTemporalIndexer();
+ temporalIndexer.setConf(conf);
} else {
- geoIndexer = new GeoMesaGeoIndexer();
+ //geoIndexer = new GeoMesaGeoIndexer();
--- End diff --
can you remove the commented out code?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---