Class RocksDbKey

java.lang.Object
org.apache.storm.metricstore.rocksdb.RocksDbKey
All Implemented Interfaces:
Comparable<RocksDbKey>

public class RocksDbKey extends Object implements Comparable<RocksDbKey>
Class representing the data used as a Key in RocksDB. Keys can be used either for metadata or metrics.

Keys are 38 bytes in size. The fields for a key are:

<
 Field             Size         Offset

 Type                 1              0      The type maps to the KeyType enum, specifying a metric or various types of metadata
 Aggregation Level    1              1      The aggregation level for a metric (see AggLevel enum).  0 for metadata.
 TopologyId           4              2      The metadata string Id representing a topologyId for a metric, or the unique
                                                   string Id for a metadata string
 Timestamp            8              6      The timestamp for a metric, unused for metadata
 MetricId             4             14      The metadata string Id for the metric name
 ComponentId          4             18      The metadata string Id for the component Id
 ExecutorId           4             22      The metadata string Id for the executor Id
 HostId               4             26      The metadata string Id for the host Id
 Port                 4             30      The port number
 StreamId             4             34      The metadata string Id for the stream Id