-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-16331: remove EOSv1 from StreamsProducer #17212
KAFKA-16331: remove EOSv1 from StreamsProducer #17212
Conversation
@@ -203,11 +198,6 @@ public static Map<TopicPartition, ListOffsetsResultInfo> fetchEndOffsets(final C | |||
return getEndOffsets(fetchEndOffsetsFuture(partitions, adminClient)); | |||
} | |||
|
|||
public static String extractThreadId(final String fullThreadName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side cleanup -- unused -- removing
eosAlphaMockClientSupplier.setCluster(cluster); | ||
eosAlphaMockClientSupplier.setApplicationIdForProducer("appId"); | ||
eosAlphaStreamsProducer = | ||
eosMockClientSupplier.setCluster(cluster); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many EOS tests where not EOSv1 vs EOSv2 specific, but used eosAlphaXxx
variables -- updating these to use eosBetaXxx
(renamed to just eosXxxx
) -- more of this below.
@@ -191,7 +191,7 @@ public static <K, V> KeyValueStoreTestDriver<K, V> create(final Serializer<K> ke | |||
private final Set<K> flushedRemovals = new HashSet<>(); | |||
private final List<KeyValue<byte[], byte[]>> restorableEntries = new LinkedList<>(); | |||
|
|||
private final InternalMockProcessorContext context; | |||
private final InternalMockProcessorContext<?, ?> context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side cleanup
@@ -266,7 +265,7 @@ public <K1, V1> void send(final String topic, | |||
stateDir.mkdirs(); | |||
stateSerdes = serdes; | |||
|
|||
context = new InternalMockProcessorContext(stateDir, serdes.keySerde(), serdes.valueSerde(), recordCollector, null) { | |||
context = new InternalMockProcessorContext<Object, Object>(stateDir, serdes.keySerde(), serdes.valueSerde(), recordCollector, null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side cleanup
@@ -447,7 +446,7 @@ private StreamTask createStreamsTask(final StreamsConfig streamsConfig, | |||
topology | |||
); | |||
final StreamsMetricsImpl streamsMetrics = new MockStreamsMetrics(metrics); | |||
final InternalProcessorContext context = new ProcessorContextImpl( | |||
final InternalProcessorContext<?, ?> context = new ProcessorContextImpl( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side cleanup
09744d7
to
32d8ae0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjsax thanks for this patch. Could you please fix the build error:
[ant:checkstyle] [ERROR] /home/chia7712/project/kafka/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsProducer.java:46:8: Unused import - org.apache.kafka.streams.processor.TaskId.
@@ -318,14 +314,7 @@ Map<MetricName, Metric> producerMetrics() { | |||
} | |||
|
|||
Set<String> producerClientIds() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use String
instead of Set<String>>
for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but not "completely". The ThreadMetadata
interface is public API, and thus it's impl cannot be changed. I can include as much cleanup as possible thought.
Would need a KIP to change it -- not sure if worth doing at this point thought...
@@ -191,7 +191,7 @@ public static <K, V> KeyValueStoreTestDriver<K, V> create(final Serializer<K> ke | |||
private final Set<K> flushedRemovals = new HashSet<>(); | |||
private final List<KeyValue<byte[], byte[]>> restorableEntries = new LinkedList<>(); | |||
|
|||
private final InternalMockProcessorContext context; | |||
private final InternalMockProcessorContext<?, ?> context; | |||
private final StateSerdes<K, V> stateSerdes; | |||
|
|||
@SuppressWarnings("unchecked") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be removed
No description provided.