Package org.apache.pinot.spi.stream
Interface RowMetadata
-
- All Known Implementing Classes:
StreamMessageMetadata
@Public @Evolving public interface RowMetadata
A class that provides relevant row-level metadata for rows indexed into a segment. Currently this is relevant for rows ingested into a mutable segment - the metadata is expected to be provided by the underlying stream.
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,String>EMPTY_COLLECTIONstatic GenericRowEMPTY_ROW
-
Method Summary
Modifier and Type Method Description default GenericRowgetHeaders()Returns the stream message headerslonggetRecordIngestionTimeMs()Returns the timestamp associated with the record.default Map<String,String>getRecordMetadata()Returns the metadata associated with the stream record Kafka's record offset would be an example of a metadata associated with the record.
-
-
-
Field Detail
-
EMPTY_ROW
static final GenericRow EMPTY_ROW
-
-
Method Detail
-
getRecordIngestionTimeMs
long getRecordIngestionTimeMs()
Returns the timestamp associated with the record. This typically refers to the time it was ingested into the upstream source. In some cases, it may be the time at which the record was created, aka event time (eg. in kafka, a topic may be configured to use record `CreateTime` instead of `LogAppendTime`). Expected to be used for stream-based sources.- Returns:
- timestamp (epoch in milliseconds) when the row was ingested upstream Long.MIN_VALUE if not available
-
getHeaders
default GenericRow getHeaders()
Returns the stream message headers- Returns:
- A
GenericRowthat encapsulates the headers in the ingested row
-
getRecordMetadata
default Map<String,String> getRecordMetadata()
Returns the metadata associated with the stream record Kafka's record offset would be an example of a metadata associated with the record. Record metadata is typically stream specific and hence, it is defined as a Map of strings.- Returns:
- A Map of record metadata entries.
-
-