public class EncodingStats extends java.lang.Object implements IMeasurableMemory
Those stats are used to optimize the on-wire and on-disk storage of rows. More precisely,
the minTimestamp
, minLocalDeletionTime
and minTTL
stats are used to
delta-encode those information for the sake of vint encoding.
Note that due to their use, those stats can suffer to be somewhat inaccurate (the more incurrate
they are, the less effective the storage will be, but provided the stats are not completly wacky,
this shouldn't have too huge an impact on performance) and in fact they will not always be
accurate for reasons explained in SerializationHeader.make(org.apache.cassandra.schema.TableMetadata, java.util.Collection<org.apache.cassandra.io.sstable.format.SSTableReader>)
.
Modifier and Type | Class and Description |
---|---|
static class |
EncodingStats.Collector |
static class |
EncodingStats.Serializer |
Modifier and Type | Field and Description |
---|---|
static long |
HEAP_SIZE |
int |
minLocalDeletionTime |
long |
minTimestamp |
int |
minTTL |
static EncodingStats |
NO_STATS |
static EncodingStats.Serializer |
serializer |
static long |
TIMESTAMP_EPOCH |
Constructor and Description |
---|
EncodingStats(long minTimestamp,
int minLocalDeletionTime,
int minTTL) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static <V,F extends java.util.function.Function<V,EncodingStats>> |
merge(java.util.List<V> values,
F function)
Merge one or more EncodingStats, that are lazily materialized from some list of arbitrary type by the provided function
|
EncodingStats |
mergeWith(EncodingStats that)
Merge this stats with another one.
|
java.lang.String |
toString() |
long |
unsharedHeapSize() |
public static final long TIMESTAMP_EPOCH
public static final EncodingStats NO_STATS
public static long HEAP_SIZE
public static final EncodingStats.Serializer serializer
public final long minTimestamp
public final int minLocalDeletionTime
public final int minTTL
public EncodingStats(long minTimestamp, int minLocalDeletionTime, int minTTL)
public EncodingStats mergeWith(EncodingStats that)
The comments of SerializationHeader.make(org.apache.cassandra.schema.TableMetadata, java.util.Collection<org.apache.cassandra.io.sstable.format.SSTableReader>)
applies here too, i.e. the result of
merging will be not totally accurate but we can live with that.
public static <V,F extends java.util.function.Function<V,EncodingStats>> EncodingStats merge(java.util.List<V> values, F function)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public long unsharedHeapSize()
unsharedHeapSize
in interface IMeasurableMemory
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009- The Apache Software Foundation