Xingyu Zha created ATLAS-4554:
---------------------------------
Summary: Elasticsearch: Add Elasticsearch backend monitor && Fix
some bugs when using atlas with elasticsearch backend
Key: ATLAS-4554
URL: https://issues.apache.org/jira/browse/ATLAS-4554
Project: Atlas
Issue Type: Improvement
Components: atlas-core, atlas-intg
Affects Versions: 3.0.0
Reporter: Xingyu Zha
Fix For: 3.0.0
Attachments: feat__add_elasticsearch_backend_monitor.patch
When using elasticsearch as the background index, the status of solr is
displayed as unhealthy.
{code:java}
if (!isHealthy && (prevSolrHealthCheckTime == 0 || currentTime -
prevSolrHealthCheckTime > SOLR_STATUS_LOG_FREQUENCY_MS)) {
LOG.info("Solr Health: Unhealthy!"); {code}
Looking at the code, it is found that atlas currently only has the health
monitoring of the solr index, so the relevant monitoring function about
elasticsearch has been added.
{code:java}
if (backendSolr.equals(backend) && isSolrHealthy()) {
isHealthy = true;
LOG.info("Backend Solr Health: Healthy!");
}
else if (backendElasticSearch.equals(backend) && isElasticsearchHealthy()) {
isHealthy = true;
LOG.info("Backend ElasticSearch Health: Healthy!");
} {code}
By the way, ElasticSearch7index support was added, extracted from the
org.janusgraph.diskstorage.es code, and adjusted with method to new client
instance
{code:java}
graphdb/janus/src/main/java/org/janusgraph/diskstorage/es/ElasticSearch7Index.java
{code}
At the same time, in the process of use, there is also a problem that cannot be
used due to log.info problems, and it has been fixed here
{code:java}
LOG.info("Setting " + SOLR_WAIT_SEARCHER_CONF + " = " +
getBoolean(SOLR_WAIT_SEARCHER_CONF)); {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)