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
[FLINK-11015] Remove deprecated methods and classes about table from all the Kafka connectors #7182
Conversation
@twalthr Can you review this PR? It blocks FLINK-9461. |
cc @pnowojski |
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.
Thank you @yanghua. The removal of table-related classes looks good to me. However, the work is not complete we also need to:
- solve TODOs in
org.apache.flink.streaming.connectors.kafka.KafkaTableSinkBase
andorg.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase
- remove all deprecated methods in
org.apache.flink.streaming.connectors.kafka.KafkaTableSinkBase
andorg.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase
- remove everything commented with
legacy
inorg.apache.flink.streaming.connectors.kafka.KafkaTableSinkBase
- remove builder in
org.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase
I'm also wondering why you remove classes that have nothing to do with flink-table
. Such as TransactionalIdsGeneratorTest
can you explain that.
* IT cases for the {@link FlinkKafkaProducer011}. | ||
*/ | ||
@SuppressWarnings("serial") | ||
public class FlinkKafkaProducer011ITCase extends KafkaTestBase { |
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 change has nothing to do with a flink-table
free Kafka module. It should be moved to a separate PR or at least separate commit. Why can we remove this class 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.
Sorry This is an operational mistake, I should be more careful.
@twalthr thanks for your suggestion. I have checked the list you gave. I found the builder in org.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase has been deleted before you point. |
…all the Kafka connectors
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.
Thanks for the update @yanghua. One additional comment. We should also update the dependencies of the Maven modules.
|
||
/** Partitioner to select Kafka partition for each item. */ | ||
protected final Optional<FlinkKafkaPartitioner<Row>> partitioner; | ||
|
||
// legacy variables | ||
protected String[] fieldNames; |
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.
I think we also don't need these variables anymore.
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.
Done.
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-json</artifactId> | ||
<version>${project.version}</version> | ||
<type>test-jar</type> |
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.
@yanghua Do we need to generate test jars for flink-json
and flink-avro
anymore?
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.
@twalthr The specific test cases have been removed and there is no error when building by maven. Did I miss anything else?
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.
In order to share test classes across modules a module must build test-jar
s. If the test jar of flink-json
and flink-avro
are not necessary anymore, we can remove the jar building section from those pom.xml
.
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.
My own Travis has turned green (Can not make sure if you can see this link). OK, It would be better to wait and see Travis's result to verify the judgment.
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.
@twalthr Any other changes? If not, I look forward to merging it as soon as possible to advance FLINK-9461. Thanks. |
+1 to the pom changes. |
Thank you @zentol. I will take care of merging this... |
@twalthr Let's merge this PR? thanks. |
@@ -44,12 +44,6 @@ under the License. | |||
|
|||
<!-- core dependencies --> | |||
|
|||
<dependency> |
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.
We need to reintroduce this dependency as org.apache.flink.streaming.util.serialization.JSONKeyValueDeserializationSchema
still requires Jackson. I discussed this with Chesnay. I will reintroduce it while merging.
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.
OK.
…connectors This commit removes all classes and methods that have been deprecated in Flink 1.6 for separating Kafka connectors from Avro and JSON formats. This closes apache#7182.
…connectors This commit removes all classes and methods that have been deprecated in Flink 1.6 for separating Kafka connectors from Avro and JSON formats. This closes apache#7182.
…connectors This commit removes all classes and methods that have been deprecated in Flink 1.6 for separating Kafka connectors from Avro and JSON formats. This closes apache#7182.
What is the purpose of the change
This pull request removes deprecated methods and classes about table from all the Kafka connectors
Brief change log
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation