Interface RateEstimator
- All Superinterfaces:
Serializable
A component that estimates the rate at which an
InputDStream should ingest
records, based on updates at every batch completion.
Please see org.apache.spark.streaming.scheduler.RateController for more details.
-
Method Summary
Modifier and TypeMethodDescriptionscala.Option<Object>compute(long time, long elements, long processingDelay, long schedulingDelay) Computes the number of records the stream attached to thisRateEstimatorshould ingest per second, given an update on the size and completion times of the latest batch.
-
Method Details
-
compute
Computes the number of records the stream attached to thisRateEstimatorshould ingest per second, given an update on the size and completion times of the latest batch.- Parameters:
time- The timestamp of the current batch interval that just finishedelements- The number of records that were processed in this batchprocessingDelay- The time in ms that took for the job to completeschedulingDelay- The time in ms that the job spent in the scheduling queue- Returns:
- (undocumented)
-