Package org.graylog2.system.processing
Class DBProcessingStatusService
java.lang.Object
org.graylog2.system.processing.DBProcessingStatusService
Manages the database collection for processing status.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDBProcessingStatusService
(MongoConnection mongoConnection, NodeId nodeId, JobSchedulerClock clock, com.github.joschi.jadconfig.util.Duration updateThreshold, int journalWriteRateThreshold, MongoJackObjectMapperProvider mapper, BaseConfiguration baseConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionall()
Rerturns all existing processing status entries from the database.calculateProcessingState
(TimeRange timeRange) Calculates the processing state of all active Graylog nodes in the cluster.get()
Returns the processing status entry for the calling node.save
(ProcessingStatusRecorder processingStatusRecorder) Create or update (upsert) a processing status entry for the givenProcessingStatusRecorder
using the caller's node ID.
-
Field Details
-
COLLECTION_NAME
- See Also:
-
-
Constructor Details
-
DBProcessingStatusService
@Inject public DBProcessingStatusService(MongoConnection mongoConnection, NodeId nodeId, JobSchedulerClock clock, @Named("processing_status_update_threshold") com.github.joschi.jadconfig.util.Duration updateThreshold, @Named("processing_status_journal_write_rate_threshold") int journalWriteRateThreshold, MongoJackObjectMapperProvider mapper, BaseConfiguration baseConfiguration)
-
-
Method Details
-
all
Rerturns all existing processing status entries from the database.- Returns:
- a list of all processing status entries
-
get
Returns the processing status entry for the calling node.- Returns:
- the processing status entry or an empty optional if none exists
-
save
Create or update (upsert) a processing status entry for the givenProcessingStatusRecorder
using the caller's node ID.- Parameters:
processingStatusRecorder
- the processing recorder object to create/update- Returns:
- the created/updated entry
-
calculateProcessingState
Calculates the processing state of all active Graylog nodes in the cluster. This can be used to find out if a certain timerange is already searchable in Elastic / OpenSearch.Beware: This only takes the message receive time into account. It doesn't help when log sources send their messages late.
- Returns:
- A combined state of all processing nodes in this cluster. See
DBProcessingStatusService.ProcessingNodesState
-