class
CompressedMetricsSink extends MetricsSink
Instance Constructors
-
new
CompressedMetricsSink(resolution: Long, dataRange: Option[Interval], origin: Long, storage: Array[Long])
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
def
addUsage(startTime: Long, endTime: Long, weight: Int = 1): CompressedMetricsSink
-
def
apply(index: Int): Long
-
final
def
asInstanceOf[T0]: T0
-
def
batchAddUsage(pairs: Seq[(Long, Long)], weight: Int): CompressedMetricsSink
-
lazy val
bucketEnd: Long
-
lazy val
bucketStart: Long
-
-
def
clone(): AnyRef
-
def
convertToUsageDistribution: Map[Int, Long]
-
val
dataRange: Option[Interval]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
def
getAvgValueForTime(time: Long): Option[Double]
-
def
getBucket(index: Int): Option[Long]
-
def
getBucketIndex(time: Long): Int
-
final
def
getClass(): Class[_]
-
def
getValueForTime(time: Long): Option[Long]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
lazy val
length: Int
-
final
def
ne(arg0: AnyRef): Boolean
-
def
nonEmpty: Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
removeUsage(startTime: Long, endTime: Long, weight: Int = 1): CompressedMetricsSink
-
val
resolution: Long
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A constant-memory-complexity data structure to store time series data points
It produces a ganglia-like feature, that if the new data to be added is newer than the maximum this can contain, a
compact
will be performed to increase the resolution (time range each bucket contains) according togetNextResolution
, so this data structure can record newer data without losing the earliest data points.When first created, the size of the array will be the number of buckets to keep in memory The time range represented by each bucket is configured by
resolution
8/11/16.