@ThreadSafe public class StreamsTaskCounter extends Object implements StreamsTaskCounterMXBean
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_TEMPLATE |
| Constructor and Description |
|---|
StreamsTaskCounter(String id) |
StreamsTaskCounter(String id,
String streamId,
long startedAt) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTime(long processTime)
Add the time it takes to process a single datum in milliseconds
|
double |
getAvgTime()
Returns the average time in milliseconds it takes the task to readCurrent, process, or write to return.
|
double |
getErrorRate()
Get the error rate of the streams process calculated by the number of errors not handled by the
StreamsTask
divided by the number of datums received. |
long |
getMaxTime()
Returns the max time in milliseconds it takes the task to readCurrent, process, or write to return.
|
long |
getNumEmitted()
Get the number of
StreamsDatums emitted by the streams process |
long |
getNumReceived()
Get the number of
StreamsDatums received by the streams process |
long |
getNumUnhandledErrors()
Get the number of errors that the process had to catch because the executing Provider/Processor/Writer did not
catch and handle the exception
|
void |
incrementEmittedCount()
Increment emitted count
|
void |
incrementEmittedCount(long delta)
Increment emitted count
|
void |
incrementErrorCount()
Increment error count
|
void |
incrementErrorCount(long delta)
Increment error count
|
void |
incrementReceivedCount()
Increment received count
|
void |
incrementReceivedCount(long delta)
Increment received count
|
public static final String NAME_TEMPLATE
public StreamsTaskCounter(String id)
id - public void incrementEmittedCount()
public void incrementEmittedCount(long delta)
delta - public void incrementErrorCount()
public void incrementErrorCount(long delta)
delta - public void incrementReceivedCount()
public void incrementReceivedCount(long delta)
delta - public void addTime(long processTime)
processTime - public double getErrorRate()
StreamsTaskCounterMXBeanStreamsTask
divided by the number of datums received.getErrorRate in interface StreamsTaskCounterMXBeanpublic long getNumEmitted()
StreamsTaskCounterMXBeanStreamsDatums emitted by the streams processgetNumEmitted in interface StreamsTaskCounterMXBeanpublic long getNumReceived()
StreamsTaskCounterMXBeanStreamsDatums received by the streams processgetNumReceived in interface StreamsTaskCounterMXBeanpublic long getNumUnhandledErrors()
StreamsTaskCounterMXBeangetNumUnhandledErrors in interface StreamsTaskCounterMXBeanpublic double getAvgTime()
StreamsTaskCounterMXBeangetAvgTime in interface StreamsTaskCounterMXBeanpublic long getMaxTime()
StreamsTaskCounterMXBeangetMaxTime in interface StreamsTaskCounterMXBeanCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.