Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[geomesa-dev] DataStoreFinder too slow on first connection

Hello everyone, 

I am dealing with a very weird and unexpected problem that I would like to share with you in case you have any suggestions. 

I have set up my system with Zookeeper 3.4.6 on localhost, Hadoop 2.2.0, Accumulo 1.7.3, Geomesa 2.11-1.3.5 and Geotools 15.1.

I have written a very simple script that connects to an Geomesa Accumulo DataStore and uploads some data. 

I use the line: 

DataStore dataStore = DataStoreFinder.getDataStore(parameters); in my code

I am importing the org.geotools.data.DataStoreFinder accordingly.

The first time that I call the function, with the above line, it takes around 4 to 5 secs to find the DataStore and less than 300 msecs to upload the data.

If I create a loop and call this function more than once, even with some delay between the calls, from the second time onward it takes less than 20msecs to find the datastore and approximately the same time (300 msecs) to upload the data. I am not sure if this has something to do with Java optimization, and the connection is maintained from the first call or with anything else. 

The problem is that I want to call the function from a client app that will call quite often but only once each time, making the 4 secs a serious problem.

I have tried searching for any related problems but I couldn't find anything helpful. So any ideas and thoughts on what might be the problem are highly appreciated.

Thank you very much for your time.

Best regards, 
Maria.




Back to the top