You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/04/03 16:20:33 UTC
[GitHub] [kafka] ijuma opened a new pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
ijuma opened a new pull request #10470:
URL: https://github.com/apache/kafka/pull/10470
These has been deprecated since 0.11, but there are no replacements.
Message format 2 moved the checksum to the record batch (instead of the
record).
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r607914823
##########
File path: core/src/main/scala/kafka/tools/ConsoleConsumer.scala
##########
@@ -614,18 +613,3 @@ class NoOpMessageFormatter extends MessageFormatter {
def writeTo(consumerRecord: ConsumerRecord[Array[Byte], Array[Byte]], output: PrintStream): Unit = {}
}
-class ChecksumMessageFormatter extends MessageFormatter {
Review comment:
I wonder if we should explicitly mention this one in the upgrade notes. It could be considered as part of the `console-consumer` tool which is part of our public API. It is in a gray zone. I am pretty sure that it is not used anymore but how knows... What's you take on this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #10470: KAFKA-12612: Remove `checksum` from ConsumerRecord/RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#issuecomment-819865445
3 jobs passed, one (Build / JDK 15 and Scala 2.13) failed with unrelated flakes:
>org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testReplicationWithEmptyPartition()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testOneWayReplicationWithAutoOffsetSync()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testReplicationWithEmptyPartition()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationSSLTest.testOneWayReplicationWithAutoOffsetSync()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.integration.RebalanceSourceConnectorsIntegrationTest.testDeleteConnectorBuild / JDK 15 and Scala 2.13 / kafka.server.RaftClusterTest.testCreateClusterAndCreateListDeleteTopic()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTest.testOneWayReplicationWithAutoOffsetSync()Build / JDK 15 and Scala 2.13 / org.apache.kafka
.connect.mirror.integration.MirrorConnectorsIntegrationTest.testOneWayReplicationWithAutoOffsetSync()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTest.testReplicationWithEmptyPartition()Build / JDK 15 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTest.testReplicationWithEmptyPartition()
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608748053
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
##########
@@ -77,12 +73,41 @@ public ConsumerRecord(String topic,
* @param offset The offset of this record in the corresponding Kafka partition
* @param timestamp The timestamp of the record.
* @param timestampType The timestamp type
- * @param checksum The checksum (CRC32) of the full record
* @param serializedKeySize The length of the serialized key
* @param serializedValueSize The length of the serialized value
* @param key The key of the record, if one exists (null is allowed)
* @param value The record contents
*/
+ public ConsumerRecord(String topic,
+ int partition,
+ long offset,
+ long timestamp,
+ TimestampType timestampType,
+ int serializedKeySize,
+ int serializedValueSize,
+ K key,
+ V value) {
+ this(topic, partition, offset, timestamp, timestampType, serializedKeySize, serializedValueSize,
+ key, value, new RecordHeaders());
+ }
+
+ /**
+ * Creates a record to be received from a specified topic and partition (provided for
+ * compatibility with Kafka 0.10 before the message format supported headers).
+ *
+ * @param topic The topic this record is received from
+ * @param partition The partition of the topic this record is received from
+ * @param offset The offset of this record in the corresponding Kafka partition
+ * @param timestamp The timestamp of the record.
+ * @param timestampType The timestamp type
+ * @param serializedKeySize The length of the serialized key
+ * @param serializedValueSize The length of the serialized value
+ * @param key The key of the record, if one exists (null is allowed)
+ * @param value The record contents
+ *
+ * @deprecated use one of the constructors without a `checksum` parameter
Review comment:
Yeah, I agree it's annoying. Also, it would be nice to have a constructor like:
```java
public ConsumerRecord(String topic,
int partition,
long offset,
long timestamp,
TimestampType timestampType,
K key,
V value)
```
And deprecate:
```java
public ConsumerRecord(String topic,
int partition,
long offset,
K key,
V value) {
```
But that requires a KIP. For now, I will remove some of the new constructors I added and add a single one:
```java
public ConsumerRecord(String topic,
int partition,
long offset,
long timestamp,
TimestampType timestampType,
int serializedKeySize,
int serializedValueSize,
K key,
V value,
Headers headers,
Optional<Integer> leaderEpoch) {
```
I'll update the PR with these changes tomorrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608214927
##########
File path: core/src/main/scala/kafka/tools/ConsoleConsumer.scala
##########
@@ -614,18 +613,3 @@ class NoOpMessageFormatter extends MessageFormatter {
def writeTo(consumerRecord: ConsumerRecord[Array[Byte], Array[Byte]], output: PrintStream): Unit = {}
}
-class ChecksumMessageFormatter extends MessageFormatter {
Review comment:
Good question, I was debating it myself. Technically, this is not public API since it's not mentioned in the public javadoc and it's in the `core` module (everything is private in the `core` module).
However, it is possible that people would pass this class when using the console consumer. The checksum value has never been correct for message format 2, which has been the default since 0.11, so I figured the chances that people actually used this semi public API is low. Seems like there isn't much harm in mentioning it in the upgrade notes though, so will add.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608332079
##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
##########
@@ -42,20 +41,26 @@
private final int serializedValueSize;
private final TopicPartition topicPartition;
- private volatile Long checksum;
-
public RecordMetadata(TopicPartition topicPartition, long baseOffset, long relativeOffset, long timestamp,
- Long checksum, int serializedKeySize, int serializedValueSize) {
+ int serializedKeySize, int serializedValueSize) {
// ignore the relativeOffset if the base offset is -1,
// since this indicates the offset is unknown
this.offset = baseOffset == -1 ? baseOffset : baseOffset + relativeOffset;
this.timestamp = timestamp;
- this.checksum = checksum;
this.serializedKeySize = serializedKeySize;
this.serializedValueSize = serializedValueSize;
this.topicPartition = topicPartition;
}
+ /**
+ * @deprecated use constructor without `checksum` parameter.
+ */
+ @Deprecated
+ public RecordMetadata(TopicPartition topicPartition, long baseOffset, long relativeOffset, long timestamp,
Review comment:
Not sure whether we have to offer this constructor. We remove the `checksum` from all constructors of `ConsumerRecord` even though we don't add deprecation annotation to constructors before.
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1385,7 +1385,7 @@ private void handleOffsetOutOfRange(FetchPosition fetchPosition, TopicPartition
byte[] valueByteArray = valueBytes == null ? null : Utils.toArray(valueBytes);
V value = valueBytes == null ? null : this.valueDeserializer.deserialize(partition.topic(), headers, valueByteArray);
return new ConsumerRecord<>(partition.topic(), partition.partition(), offset,
- timestamp, timestampType, record.checksumOrNull(),
Review comment:
Could we remove `checksumOrNull` from `Record`? That method works for `AbstractLegacyRecordBatch` only.
##########
File path: clients/src/test/java/org/apache/kafka/clients/producer/internals/ProducerBatchTest.java
##########
@@ -65,7 +64,6 @@ public void testChecksumNullForMagicV2() {
ProducerBatch batch = new ProducerBatch(new TopicPartition("topic", 1), memoryRecordsBuilder, now);
FutureRecordMetadata future = batch.tryAppend(now, null, new byte[10], Record.EMPTY_HEADERS, null, now);
assertNotNull(future);
- assertNull(future.checksumOrNull());
Review comment:
this test case (`testChecksumNullForMagicV2`) is meaningless after we remove `assertNull(future.checksumOrNull())`. It seems to me it is ok to remove whole test case.
##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
##########
@@ -89,25 +94,6 @@ public long timestamp() {
return this.timestamp;
}
- /**
- * The checksum (CRC32) of the record.
- *
- * @deprecated As of Kafka 0.11.0. Because of the potential for message format conversion on the broker, the
- * computed checksum may not match what was stored on the broker, or what will be returned to the consumer.
- * It is therefore unsafe to depend on this checksum for end-to-end delivery guarantees. Additionally,
- * message format v2 does not include a record-level checksum (for performance, the record checksum
- * was replaced with a batch checksum). To maintain compatibility, a partial checksum computed from
- * the record timestamp, serialized key size, and serialized value size is returned instead, but
- * this should not be depended on for end-to-end reliability.
- */
- @Deprecated
- public long checksum() {
- if (checksum == null)
- // The checksum is null only for message format v2 and above, which do not have a record-level checksum.
- this.checksum = DefaultRecord.computePartialChecksum(timestamp, serializedKeySize, serializedValueSize);
Review comment:
Could you remove `computePartialChecksum`? It is unused now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608362518
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
##########
@@ -32,7 +31,6 @@
public class ConsumerRecord<K, V> {
public static final long NO_TIMESTAMP = RecordBatch.NO_TIMESTAMP;
public static final int NULL_SIZE = -1;
- public static final int NULL_CHECKSUM = -1;
Review comment:
Does this line need deprecation cycle also?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608343399
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1385,7 +1385,7 @@ private void handleOffsetOutOfRange(FetchPosition fetchPosition, TopicPartition
byte[] valueByteArray = valueBytes == null ? null : Utils.toArray(valueBytes);
V value = valueBytes == null ? null : this.valueDeserializer.deserialize(partition.topic(), headers, valueByteArray);
return new ConsumerRecord<>(partition.topic(), partition.partition(), offset,
- timestamp, timestampType, record.checksumOrNull(),
Review comment:
I had initially removed it. But I added it back since it's used by `DumpLogSegments`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#issuecomment-812888043
Will update `upgrade.html` soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608345818
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1385,7 +1385,7 @@ private void handleOffsetOutOfRange(FetchPosition fetchPosition, TopicPartition
byte[] valueByteArray = valueBytes == null ? null : Utils.toArray(valueBytes);
V value = valueBytes == null ? null : this.valueDeserializer.deserialize(partition.topic(), headers, valueByteArray);
return new ConsumerRecord<>(partition.topic(), partition.partition(), offset,
- timestamp, timestampType, record.checksumOrNull(),
Review comment:
`DumpLogSegments` can call `RecordBatch#checksum` instead of `checksumOrNull` if the record is legacy. I can file a PR as follow-up to address that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #10470: KAFKA-12612: Remove `checksum` from ConsumerRecord/RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r613418374
##########
File path: clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java
##########
@@ -398,7 +398,7 @@ private int writeLegacyCompressedWrapperHeader() {
/**
* Append a record and return its checksum for message format v0 and v1, or null for v2 and above.
Review comment:
Could you update this docs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608347559
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1385,7 +1385,7 @@ private void handleOffsetOutOfRange(FetchPosition fetchPosition, TopicPartition
byte[] valueByteArray = valueBytes == null ? null : Utils.toArray(valueBytes);
V value = valueBytes == null ? null : this.valueDeserializer.deserialize(partition.topic(), headers, valueByteArray);
return new ConsumerRecord<>(partition.topic(), partition.partition(), offset,
- timestamp, timestampType, record.checksumOrNull(),
Review comment:
I don't think that suggestion works. However, you could add conditional code in `DumpLogSegments` so that the crc at the record level is only printed if it's `AbstractLegacyRecordBatch`. Sounds good as a follow-up.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608745722
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
##########
@@ -32,7 +31,6 @@
public class ConsumerRecord<K, V> {
public static final long NO_TIMESTAMP = RecordBatch.NO_TIMESTAMP;
public static final int NULL_SIZE = -1;
- public static final int NULL_CHECKSUM = -1;
Review comment:
Yes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608350408
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/Fetcher.java
##########
@@ -1385,7 +1385,7 @@ private void handleOffsetOutOfRange(FetchPosition fetchPosition, TopicPartition
byte[] valueByteArray = valueBytes == null ? null : Utils.toArray(valueBytes);
V value = valueBytes == null ? null : this.valueDeserializer.deserialize(partition.topic(), headers, valueByteArray);
return new ConsumerRecord<>(partition.topic(), partition.partition(), offset,
- timestamp, timestampType, record.checksumOrNull(),
Review comment:
> Sounds good as a follow-up.
#10498
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#issuecomment-812907353
> Will update `upgrade.html` soon.
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma merged pull request #10470: KAFKA-12612: Remove `checksum` from ConsumerRecord/RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma merged pull request #10470:
URL: https://github.com/apache/kafka/pull/10470
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608377759
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
##########
@@ -77,12 +73,41 @@ public ConsumerRecord(String topic,
* @param offset The offset of this record in the corresponding Kafka partition
* @param timestamp The timestamp of the record.
* @param timestampType The timestamp type
- * @param checksum The checksum (CRC32) of the full record
* @param serializedKeySize The length of the serialized key
* @param serializedValueSize The length of the serialized value
* @param key The key of the record, if one exists (null is allowed)
* @param value The record contents
*/
+ public ConsumerRecord(String topic,
+ int partition,
+ long offset,
+ long timestamp,
+ TimestampType timestampType,
+ int serializedKeySize,
+ int serializedValueSize,
+ K key,
+ V value) {
+ this(topic, partition, offset, timestamp, timestampType, serializedKeySize, serializedValueSize,
+ key, value, new RecordHeaders());
+ }
+
+ /**
+ * Creates a record to be received from a specified topic and partition (provided for
+ * compatibility with Kafka 0.10 before the message format supported headers).
+ *
+ * @param topic The topic this record is received from
+ * @param partition The partition of the topic this record is received from
+ * @param offset The offset of this record in the corresponding Kafka partition
+ * @param timestamp The timestamp of the record.
+ * @param timestampType The timestamp type
+ * @param serializedKeySize The length of the serialized key
+ * @param serializedValueSize The length of the serialized value
+ * @param key The key of the record, if one exists (null is allowed)
+ * @param value The record contents
+ *
+ * @deprecated use one of the constructors without a `checksum` parameter
Review comment:
It is a pity that we have to carry on these constructors. Should we explicitly add the deprecation version in the message here and in the others? Thinking about the future, it is a little easier to decide when they can be removed when they do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10470: KAFKA-12612: Remove checksum from ConsumerRecord and RecordMetadata for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608342700
##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java
##########
@@ -42,20 +41,26 @@
private final int serializedValueSize;
private final TopicPartition topicPartition;
- private volatile Long checksum;
-
public RecordMetadata(TopicPartition topicPartition, long baseOffset, long relativeOffset, long timestamp,
- Long checksum, int serializedKeySize, int serializedValueSize) {
+ int serializedKeySize, int serializedValueSize) {
// ignore the relativeOffset if the base offset is -1,
// since this indicates the offset is unknown
this.offset = baseOffset == -1 ? baseOffset : baseOffset + relativeOffset;
this.timestamp = timestamp;
- this.checksum = checksum;
this.serializedKeySize = serializedKeySize;
this.serializedValueSize = serializedValueSize;
this.topicPartition = topicPartition;
}
+ /**
+ * @deprecated use constructor without `checksum` parameter.
+ */
+ @Deprecated
+ public RecordMetadata(TopicPartition topicPartition, long baseOffset, long relativeOffset, long timestamp,
Review comment:
I probably need to add back some of the `ConsumerRecord` constructors since they were not previously deprecated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org