Closed tyrasd closed 3 years ago
maybe worth to consider is here that some other related checks happen not during the construction of the backend connector, but when an actual query is started, e.g. here:
public <X extends OSHDBMapReducible> MapReducer<X> createMapReducer(Class<X> forClass) {
// […]
if (!allCaches.containsAll(expectedCaches)) {
throw new OSHDBTableNotFoundException(Joiner.on(", ").join(expectedCaches));
}
This has the benefit that even for long open connections to Ignite (e.g. as implemented in the ohsome API) the correct state of (the data in) the cluster is checked every time a query is to be started. Maybe these checks can simply be extended to also check for the proper cluster state?
follow up from https://github.com/GIScience/oshdb/pull/335#discussion_r560811798, as suggested by @rtroilo
also perhaps to consider is if the (autoclosable)
OSHDBIgnite
class should (auto)close connections to Ignite when they are passed in as external already-existing connections from outside via thepublic OSHDBIgnite(org.apache.ignite.Ignite ignite)
constructor.