Package org.apache.beam.sdk.io.kafka
Class KafkaRecord<K,V>
- java.lang.Object
-
- org.apache.beam.sdk.io.kafka.KafkaRecord<K,V>
-
public class KafkaRecord<K,V> extends java.lang.ObjectKafkaRecord 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object obj)@Nullable org.apache.kafka.common.header.HeadersgetHeaders()org.apache.beam.sdk.values.KV<K,V>getKV()longgetOffset()intgetPartition()longgetTimestamp()KafkaTimestampTypegetTimestampType()java.lang.StringgetTopic()inthashCode()
-
-
-
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()
-
getTimestamp
public long getTimestamp()
-
getTimestampType
public KafkaTimestampType getTimestampType()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-