Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

yanghua
Copy link
Contributor

@yanghua yanghua commented Nov 27, 2018

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

  • Remove deprecated methods and classes about table from all the Kafka connectors

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:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@yanghua
Copy link
Contributor Author

yanghua commented Nov 28, 2018

@twalthr Can you review this PR? It blocks FLINK-9461.

@yanghua
Copy link
Contributor Author

yanghua commented Nov 28, 2018

cc @pnowojski

Copy link
Contributor

@twalthr twalthr left a 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 and org.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase
  • remove all deprecated methods in org.apache.flink.streaming.connectors.kafka.KafkaTableSinkBase and org.apache.flink.streaming.connectors.kafka.KafkaTableSourceBase
  • remove everything commented with legacy in org.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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@yanghua
Copy link
Contributor Author

yanghua commented Nov 28, 2018

@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.

Copy link
Contributor

@twalthr twalthr left a 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;
Copy link
Contributor

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.

Copy link
Contributor Author

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>
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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-jars. 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.

Copy link
Contributor Author

@yanghua yanghua Nov 28, 2018

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanghua I'm waiting for the OK from @zentol. Dependency changes should always be reviewed by a couple of people.

@twalthr twalthr self-assigned this Nov 28, 2018
@yanghua
Copy link
Contributor Author

yanghua commented Nov 29, 2018

@twalthr Any other changes? If not, I look forward to merging it as soon as possible to advance FLINK-9461. Thanks.

@zentol
Copy link
Contributor

zentol commented Nov 29, 2018

+1 to the pom changes.

@twalthr
Copy link
Contributor

twalthr commented Nov 29, 2018

Thank you @zentol. I will take care of merging this...

@yanghua
Copy link
Contributor Author

yanghua commented Nov 30, 2018

@twalthr Let's merge this PR? thanks.

@@ -44,12 +44,6 @@ under the License.

<!-- core dependencies -->

<dependency>
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@asfgit asfgit closed this in 7d2c269 Nov 30, 2018
zentol pushed a commit to zentol/flink that referenced this pull request Dec 6, 2018
…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.
tisonkun pushed a commit to tisonkun/flink that referenced this pull request Jan 17, 2019
…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.
jnh5y pushed a commit to jnh5y/flink that referenced this pull request Dec 18, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants