Class SourceStatsManager
- java.lang.Object
-
- org.apache.pulsar.functions.instance.stats.ComponentStatsManager
-
- org.apache.pulsar.functions.instance.stats.SourceStatsManager
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class SourceStatsManager extends ComponentStatsManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLAST_INVOCATIONstatic java.lang.StringPULSAR_SOURCE_METRICS_PREFIXstatic java.lang.StringRECEIVED_TOTALstatic java.lang.StringRECEIVED_TOTAL_1minstatic java.lang.StringSOURCE_EXCEPTIONS_TOTALstatic java.lang.StringSOURCE_EXCEPTIONS_TOTAL_1minprotected org.apache.pulsar.common.util.RateLimitersourceExceptionRateLimiterprotected org.apache.pulsar.common.util.RateLimitersysExceptionRateLimiterstatic java.lang.StringSYSTEM_EXCEPTIONS_TOTALDeclare metric namesstatic java.lang.StringSYSTEM_EXCEPTIONS_TOTAL_1minstatic java.lang.StringWRITTEN_TOTALstatic java.lang.StringWRITTEN_TOTAL_1min-
Fields inherited from class org.apache.pulsar.functions.instance.stats.ComponentStatsManager
collectorRegistry, EMPTY_QUEUE, exceptionMetricsLabelNames, metricsLabelNames, metricsLabels, scheduledFuture, USER_METRIC_PREFIX
-
-
Constructor Summary
Constructors Constructor Description SourceStatsManager(FunctionCollectorRegistry collectorRegistry, java.lang.String[] metricsLabels, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAvgProcessLatency()doublegetAvgProcessLatency1min()doublegetLastInvocation()com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>getLatestSinkExceptions()com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>getLatestSourceExceptions()com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>getLatestSystemExceptions()com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>getLatestUserExceptions()doublegetTotalProcessedSuccessfully()doublegetTotalProcessedSuccessfully1min()doublegetTotalRecordsReceived()doublegetTotalRecordsReceived1min()doublegetTotalSysExceptions()doublegetTotalSysExceptions1min()doublegetTotalUserExceptions()doublegetTotalUserExceptions1min()voidincrSinkExceptions(java.lang.Throwable ex)voidincrSourceExceptions(java.lang.Throwable ex)voidincrSysExceptions(java.lang.Throwable ex)voidincrTotalProcessedSuccessfully()voidincrTotalReceived()voidincrUserExceptions(java.lang.Throwable ex)voidprocessTimeEnd()voidprocessTimeStart()voidreset()voidsetLastInvocation(long ts)-
Methods inherited from class org.apache.pulsar.functions.instance.stats.ComponentStatsManager
close, getExceptionInfo, getStatsAsString, getStatsManager
-
-
-
-
Field Detail
-
PULSAR_SOURCE_METRICS_PREFIX
public static final java.lang.String PULSAR_SOURCE_METRICS_PREFIX
- See Also:
- Constant Field Values
-
SYSTEM_EXCEPTIONS_TOTAL
public static final java.lang.String SYSTEM_EXCEPTIONS_TOTAL
Declare metric names- See Also:
- Constant Field Values
-
SOURCE_EXCEPTIONS_TOTAL
public static final java.lang.String SOURCE_EXCEPTIONS_TOTAL
- See Also:
- Constant Field Values
-
LAST_INVOCATION
public static final java.lang.String LAST_INVOCATION
- See Also:
- Constant Field Values
-
RECEIVED_TOTAL
public static final java.lang.String RECEIVED_TOTAL
- See Also:
- Constant Field Values
-
WRITTEN_TOTAL
public static final java.lang.String WRITTEN_TOTAL
- See Also:
- Constant Field Values
-
SYSTEM_EXCEPTIONS_TOTAL_1min
public static final java.lang.String SYSTEM_EXCEPTIONS_TOTAL_1min
- See Also:
- Constant Field Values
-
SOURCE_EXCEPTIONS_TOTAL_1min
public static final java.lang.String SOURCE_EXCEPTIONS_TOTAL_1min
- See Also:
- Constant Field Values
-
RECEIVED_TOTAL_1min
public static final java.lang.String RECEIVED_TOTAL_1min
- See Also:
- Constant Field Values
-
WRITTEN_TOTAL_1min
public static final java.lang.String WRITTEN_TOTAL_1min
- See Also:
- Constant Field Values
-
sysExceptionRateLimiter
protected final org.apache.pulsar.common.util.RateLimiter sysExceptionRateLimiter
-
sourceExceptionRateLimiter
protected final org.apache.pulsar.common.util.RateLimiter sourceExceptionRateLimiter
-
-
Constructor Detail
-
SourceStatsManager
public SourceStatsManager(FunctionCollectorRegistry collectorRegistry, java.lang.String[] metricsLabels, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
-
-
Method Detail
-
reset
public void reset()
- Specified by:
resetin classComponentStatsManager
-
incrTotalReceived
public void incrTotalReceived()
- Specified by:
incrTotalReceivedin classComponentStatsManager
-
incrTotalProcessedSuccessfully
public void incrTotalProcessedSuccessfully()
- Specified by:
incrTotalProcessedSuccessfullyin classComponentStatsManager
-
incrSysExceptions
public void incrSysExceptions(java.lang.Throwable ex)
- Specified by:
incrSysExceptionsin classComponentStatsManager
-
incrUserExceptions
public void incrUserExceptions(java.lang.Throwable ex)
- Specified by:
incrUserExceptionsin classComponentStatsManager
-
incrSourceExceptions
public void incrSourceExceptions(java.lang.Throwable ex)
- Specified by:
incrSourceExceptionsin classComponentStatsManager
-
incrSinkExceptions
public void incrSinkExceptions(java.lang.Throwable ex)
- Specified by:
incrSinkExceptionsin classComponentStatsManager
-
setLastInvocation
public void setLastInvocation(long ts)
- Specified by:
setLastInvocationin classComponentStatsManager
-
processTimeStart
public void processTimeStart()
- Specified by:
processTimeStartin classComponentStatsManager
-
processTimeEnd
public void processTimeEnd()
- Specified by:
processTimeEndin classComponentStatsManager
-
getTotalProcessedSuccessfully
public double getTotalProcessedSuccessfully()
- Specified by:
getTotalProcessedSuccessfullyin classComponentStatsManager
-
getTotalRecordsReceived
public double getTotalRecordsReceived()
- Specified by:
getTotalRecordsReceivedin classComponentStatsManager
-
getTotalSysExceptions
public double getTotalSysExceptions()
- Specified by:
getTotalSysExceptionsin classComponentStatsManager
-
getTotalUserExceptions
public double getTotalUserExceptions()
- Specified by:
getTotalUserExceptionsin classComponentStatsManager
-
getLastInvocation
public double getLastInvocation()
- Specified by:
getLastInvocationin classComponentStatsManager
-
getAvgProcessLatency
public double getAvgProcessLatency()
- Specified by:
getAvgProcessLatencyin classComponentStatsManager
-
getTotalProcessedSuccessfully1min
public double getTotalProcessedSuccessfully1min()
- Specified by:
getTotalProcessedSuccessfully1minin classComponentStatsManager
-
getTotalRecordsReceived1min
public double getTotalRecordsReceived1min()
- Specified by:
getTotalRecordsReceived1minin classComponentStatsManager
-
getTotalSysExceptions1min
public double getTotalSysExceptions1min()
- Specified by:
getTotalSysExceptions1minin classComponentStatsManager
-
getTotalUserExceptions1min
public double getTotalUserExceptions1min()
- Specified by:
getTotalUserExceptions1minin classComponentStatsManager
-
getAvgProcessLatency1min
public double getAvgProcessLatency1min()
- Specified by:
getAvgProcessLatency1minin classComponentStatsManager
-
getLatestUserExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestUserExceptions()
- Specified by:
getLatestUserExceptionsin classComponentStatsManager
-
getLatestSystemExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSystemExceptions()
- Specified by:
getLatestSystemExceptionsin classComponentStatsManager
-
getLatestSourceExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSourceExceptions()
- Specified by:
getLatestSourceExceptionsin classComponentStatsManager
-
getLatestSinkExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSinkExceptions()
- Specified by:
getLatestSinkExceptionsin classComponentStatsManager
-
-