@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
StreamsDatum s emitted by the streams process |
long |
getNumReceived()
Get the number of
StreamsDatum s 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()
StreamsTaskCounterMXBean
StreamsTask
divided by the number of datums received.getErrorRate
in interface StreamsTaskCounterMXBean
public long getNumEmitted()
StreamsTaskCounterMXBean
StreamsDatum
s emitted by the streams processgetNumEmitted
in interface StreamsTaskCounterMXBean
public long getNumReceived()
StreamsTaskCounterMXBean
StreamsDatum
s received by the streams processgetNumReceived
in interface StreamsTaskCounterMXBean
public long getNumUnhandledErrors()
StreamsTaskCounterMXBean
getNumUnhandledErrors
in interface StreamsTaskCounterMXBean
public double getAvgTime()
StreamsTaskCounterMXBean
getAvgTime
in interface StreamsTaskCounterMXBean
public long getMaxTime()
StreamsTaskCounterMXBean
getMaxTime
in interface StreamsTaskCounterMXBean
Copyright © 2017 The Apache Software Foundation. All rights reserved.