Class StatsReportListener
Object
org.apache.spark.streaming.scheduler.StatsReportListener
- All Implemented Interfaces:
StreamingListener
:: DeveloperApi ::
A simple StreamingListener that logs summary statistics across Spark Streaming batches
param: numBatchInfos Number of last batches to consider for generating statistics (default: 10)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionscala.collection.mutable.Queue<BatchInfo>
scala.Option<org.apache.spark.util.Distribution>
extractDistribution
(scala.Function1<BatchInfo, scala.Option<Object>> getMetric) void
onBatchCompleted
(StreamingListenerBatchCompleted batchStarted) Called when processing of a batch of jobs has completed.void
void
showMillisDistribution
(String heading, scala.Function1<BatchInfo, scala.Option<Object>> getMetric) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.spark.streaming.scheduler.StreamingListener
onBatchStarted, onBatchSubmitted, onOutputOperationCompleted, onOutputOperationStarted, onReceiverError, onReceiverStarted, onReceiverStopped, onStreamingStarted
-
Constructor Details
-
StatsReportListener
public StatsReportListener(int numBatchInfos)
-
-
Method Details
-
batchInfos
-
onBatchCompleted
Description copied from interface:StreamingListener
Called when processing of a batch of jobs has completed.- Specified by:
onBatchCompleted
in interfaceStreamingListener
-
printStats
public void printStats() -
showMillisDistribution
-
extractDistribution
-