connection to cassandra nodes called on index process ends

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-data-indexer-se-plugin@130201 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-07-09 15:58:56 +00:00
parent c474796066
commit 34b63630db
1 changed files with 7 additions and 2 deletions

View File

@ -174,13 +174,18 @@ public class SocialDataIndexerPlugin extends Plugin<SocialDataIndexerPluginDecla
logger.error("Error while synchronizing data.", e);
}finally{
// close connection
// close connection to elasticsearch
if(client != null){
logger.info("Closing connection to elasticsearch cluster. " + client.toString());
client.close();
}
// close connection to cassandra
if(store != null){
logger.debug("Closing connection to cassandra nodes. " + store.toString());
store.closeConnection();
}
}
}