Class OpenSearchConnection
java.lang.Object
com.digitalpebble.stormcrawler.opensearch.OpenSearchConnection
Utility class to instantiate an OpenSearch client and bulkprocessor based on the configuration.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToProcessor(org.opensearch.action.DocWriteRequest<?> request) voidclose()org.opensearch.client.RestHighLevelClientstatic org.opensearch.client.RestHighLevelClientstatic OpenSearchConnectiongetConnection(Map<String, Object> stormConf, String boltType) Creates a connection with a default listener.static OpenSearchConnectiongetConnection(Map<String, Object> stormConf, String boltType, org.opensearch.action.bulk.BulkProcessor.Listener listener)
-
Method Details
-
getClient
public org.opensearch.client.RestHighLevelClient getClient() -
addToProcessor
public void addToProcessor(org.opensearch.action.DocWriteRequest<?> request) -
getClient
-
getConnection
Creates a connection with a default listener. The values for bolt type are [indexer,status,metrics] -
getConnection
public static OpenSearchConnection getConnection(Map<String, Object> stormConf, String boltType, org.opensearch.action.bulk.BulkProcessor.Listener listener) -
close
public void close()
-