Class OpensearchClient
java.lang.Object
io.camunda.zeebe.exporter.opensearch.OpensearchClient
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidclose()booleanbooleanvoidflush()Flushes the bulk request to Opensearch, unless it's currently empty.booleanindex(io.camunda.zeebe.protocol.record.Record<?> record, RecordSequence recordSequence) Indexes a record to the batch of records that will be sent to ElasticsearchbooleanCreates or updates the component template on the target Opensearch.booleanputIndexTemplate(io.camunda.zeebe.protocol.record.ValueType valueType) Creates an index template for the given value type, read from the resources.booleanputIndexTemplate(io.camunda.zeebe.protocol.record.ValueType valueType, String version) booleanReturns whether the exporter should callflush()or not.booleanupdateIndexStateManagementPolicy(Integer seqNo, Integer primaryTerm)
-
Field Details
-
ISM_INITIAL_STATE
- See Also:
-
ISM_DELETE_STATE
- See Also:
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
index
public boolean index(io.camunda.zeebe.protocol.record.Record<?> record, RecordSequence recordSequence) Indexes a record to the batch of records that will be sent to Elasticsearch- Parameters:
record- the record that will be the source of the documentrecordSequence- the sequence number of the record- Returns:
- true if the record was appended to the batch, false if the record is already indexed in the batch because only one copy of the record is allowed in the batch
-
flush
public void flush()Flushes the bulk request to Opensearch, unless it's currently empty.- Throws:
OpensearchExporterException- if not all items of the bulk were flushed successfully
-
shouldFlush
public boolean shouldFlush()Returns whether the exporter should callflush()or not.- Returns:
- true if
flush()should be called, false otherwise
-
putIndexTemplate
public boolean putIndexTemplate(io.camunda.zeebe.protocol.record.ValueType valueType) Creates an index template for the given value type, read from the resources.- Returns:
- true if request was acknowledged
-
putIndexTemplate
public boolean putIndexTemplate(io.camunda.zeebe.protocol.record.ValueType valueType, String version) -
putComponentTemplate
public boolean putComponentTemplate()Creates or updates the component template on the target Opensearch. The template is read fromTemplateReader.readComponentTemplate(). -
createIndexStateManagementPolicy
public boolean createIndexStateManagementPolicy() -
updateIndexStateManagementPolicy
-
deleteIndexStateManagementPolicy
public boolean deleteIndexStateManagementPolicy() -
bulkAddISMPolicyToAllZeebeIndices
public boolean bulkAddISMPolicyToAllZeebeIndices() -
bulkRemoveISMPolicyToAllZeebeIndices
public boolean bulkRemoveISMPolicyToAllZeebeIndices()
-