Package org.graylog2.system.processing
Class MongoDBProcessingStatusRecorderService
java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.graylog2.system.processing.MongoDBProcessingStatusRecorderService
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
,ProcessingStatusRecorder
@Singleton
public class MongoDBProcessingStatusRecorderService
extends com.google.common.util.concurrent.AbstractIdleService
implements ProcessingStatusRecorder
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Constructor Summary
ConstructorDescriptionMongoDBProcessingStatusRecorderService
(DBProcessingStatusService dbService, com.google.common.eventbus.EventBus eventBus, ServerStatus serverStatus, com.codahale.metrics.MetricRegistry metricRegistry, com.github.joschi.jadconfig.util.Duration persistInterval, ScheduledExecutorService scheduler) -
Method Summary
Modifier and TypeMethodDescriptionorg.joda.time.DateTime
double
long
double
Returns the nodeLifecycle
status for the node.org.joda.time.DateTime
org.joda.time.DateTime
long
void
handleServerShutdown
(Lifecycle lifecycle) protected void
shutDown()
protected void
startUp()
void
updateIngestReceiveTime
(org.joda.time.DateTime newTimestamp) Update the receive time for the "ingest" measurement point.void
updatePostIndexingReceiveTime
(org.joda.time.DateTime newTimestamp) Update receive time for the "post-indexing" measurement point.void
updatePostProcessingReceiveTime
(org.joda.time.DateTime newTimestamp) Update the receive time for the "post-processing" measurement point.Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
-
Constructor Details
-
MongoDBProcessingStatusRecorderService
@Inject public MongoDBProcessingStatusRecorderService(DBProcessingStatusService dbService, com.google.common.eventbus.EventBus eventBus, ServerStatus serverStatus, com.codahale.metrics.MetricRegistry metricRegistry, @Named("processing_status_persist_interval") com.github.joschi.jadconfig.util.Duration persistInterval, @Named("daemonScheduler") ScheduledExecutorService scheduler)
-
-
Method Details
-
handleServerShutdown
-
startUp
protected void startUp()- Specified by:
startUp
in classcom.google.common.util.concurrent.AbstractIdleService
-
shutDown
protected void shutDown()- Specified by:
shutDown
in classcom.google.common.util.concurrent.AbstractIdleService
-
getNodeLifecycleStatus
Description copied from interface:ProcessingStatusRecorder
Returns the nodeLifecycle
status for the node.- Specified by:
getNodeLifecycleStatus
in interfaceProcessingStatusRecorder
- Returns:
- the node lifecycle status
-
getIngestReceiveTime
public org.joda.time.DateTime getIngestReceiveTime()- Specified by:
getIngestReceiveTime
in interfaceProcessingStatusRecorder
-
getPostProcessingReceiveTime
public org.joda.time.DateTime getPostProcessingReceiveTime()- Specified by:
getPostProcessingReceiveTime
in interfaceProcessingStatusRecorder
-
getPostIndexingReceiveTime
public org.joda.time.DateTime getPostIndexingReceiveTime()- Specified by:
getPostIndexingReceiveTime
in interfaceProcessingStatusRecorder
-
getJournalInfoUncommittedEntries
public long getJournalInfoUncommittedEntries()- Specified by:
getJournalInfoUncommittedEntries
in interfaceProcessingStatusRecorder
-
getJournalInfoReadMessages1mRate
public double getJournalInfoReadMessages1mRate()- Specified by:
getJournalInfoReadMessages1mRate
in interfaceProcessingStatusRecorder
-
getJournalInfoWrittenMessages1mRate
public double getJournalInfoWrittenMessages1mRate()- Specified by:
getJournalInfoWrittenMessages1mRate
in interfaceProcessingStatusRecorder
-
getProcessBufferUsage
public long getProcessBufferUsage()- Specified by:
getProcessBufferUsage
in interfaceProcessingStatusRecorder
-
updateIngestReceiveTime
public void updateIngestReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorder
Update the receive time for the "ingest" measurement point. This is done right before a raw messages gets written to the disk journal.- Specified by:
updateIngestReceiveTime
in interfaceProcessingStatusRecorder
- Parameters:
newTimestamp
- the new timestamp to record
-
updatePostProcessingReceiveTime
public void updatePostProcessingReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorder
Update the receive time for the "post-processing" measurement point. This is done right after all message processors have run.- Specified by:
updatePostProcessingReceiveTime
in interfaceProcessingStatusRecorder
- Parameters:
newTimestamp
- the new timestamp to record
-
updatePostIndexingReceiveTime
public void updatePostIndexingReceiveTime(org.joda.time.DateTime newTimestamp) Description copied from interface:ProcessingStatusRecorder
Update receive time for the "post-indexing" measurement point. This is done right after messages have been written to Elasticsearch.- Specified by:
updatePostIndexingReceiveTime
in interfaceProcessingStatusRecorder
- Parameters:
newTimestamp
- the new timestamp to record
-