Class KafkaRecord<K,​V>


  • public class KafkaRecord<K,​V>
    extends java.lang.Object
    KafkaRecord contains key and value of the record as well as metadata for the record (topic name, partition id, and offset).
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaRecord​(java.lang.String topic, int partition, long offset, long timestamp, KafkaTimestampType timestampType, @Nullable org.apache.kafka.common.header.Headers headers, K key, V value)  
      KafkaRecord​(java.lang.String topic, int partition, long offset, long timestamp, KafkaTimestampType timestampType, @Nullable org.apache.kafka.common.header.Headers headers, org.apache.beam.sdk.values.KV<K,​V> kv)  
    • Constructor Detail

      • KafkaRecord

        public KafkaRecord​(java.lang.String topic,
                           int partition,
                           long offset,
                           long timestamp,
                           KafkaTimestampType timestampType,
                           @Nullable org.apache.kafka.common.header.Headers headers,
                           K key,
                           V value)
      • KafkaRecord

        public KafkaRecord​(java.lang.String topic,
                           int partition,
                           long offset,
                           long timestamp,
                           KafkaTimestampType timestampType,
                           @Nullable org.apache.kafka.common.header.Headers headers,
                           org.apache.beam.sdk.values.KV<K,​V> kv)
    • Method Detail

      • getTopic

        public java.lang.String getTopic()
      • getPartition

        public int getPartition()
      • getOffset

        public long getOffset()
      • getHeaders

        @Pure
        public @Nullable org.apache.kafka.common.header.Headers getHeaders()
      • getKV

        public org.apache.beam.sdk.values.KV<K,​V> getKV()
      • getTimestamp

        public long getTimestamp()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(@Nullable java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object