You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/06/03 14:17:51 UTC
[GitHub] [flink] dawidwys opened a new pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
dawidwys opened a new pull request #12468:
URL: https://github.com/apache/flink/pull/12468
## What is the purpose of the change
This change wraps the `SerializationSchema` in a `KafkaSerializationSchemaWrapper`. It makes it possible to drop the `KeyedDeserializationSchema` in the future without dropping support for `SerializationSchema`
## Verifying this change
Changed existing tests to use the `SerializationSchema` directly rather than `KeyedSerializationSchema` (which internally uses the `KafkaSerializationSchemaWrapper`) whenever possible. The remaining tests that were not ported use the other features of the `KeyedSerializationSchema` such as writing the key.
This should ensure the processing should work correctly with the wrapper.
Added additional tests for opening the schemas.
## 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, Kubernetes/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)
----------------------------------------------------------------
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] [flink] flinkbot edited a comment on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638243685
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651",
"triggerID" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"triggerType" : "PUSH"
}, {
"hash" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2727",
"triggerID" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651)
* 7bf026a4e23a89df952f6b361ab8fe435c0a612d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2727)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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] [flink] flinkbot edited a comment on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638243685
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651",
"triggerID" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"triggerType" : "PUSH"
}, {
"hash" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2727",
"triggerID" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 7bf026a4e23a89df952f6b361ab8fe435c0a612d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2727)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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] [flink] aljoscha commented on a change in pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #12468:
URL: https://github.com/apache/flink/pull/12468#discussion_r435103472
##########
File path: flink-connectors/flink-connector-kafka-0.10/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerTest.java
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.connectors.kafka;
+
+import org.apache.flink.api.common.serialization.SerializationSchema;
+import org.apache.flink.api.common.typeutils.base.IntSerializer;
+import org.apache.flink.runtime.jobgraph.OperatorID;
+import org.apache.flink.streaming.api.operators.StreamSink;
+import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for {@link FlinkKafkaProducer010}.
+ */
+public class FlinkKafkaProducerTest {
Review comment:
Should we test at least the two schemas that we want to support in the future?
----------------------------------------------------------------
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] [flink] dawidwys commented on a change in pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #12468:
URL: https://github.com/apache/flink/pull/12468#discussion_r436626745
##########
File path: flink-connectors/flink-connector-kafka-0.10/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerTest.java
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.connectors.kafka;
+
+import org.apache.flink.api.common.serialization.SerializationSchema;
+import org.apache.flink.api.common.typeutils.base.IntSerializer;
+import org.apache.flink.runtime.jobgraph.OperatorID;
+import org.apache.flink.streaming.api.operators.StreamSink;
+import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for {@link FlinkKafkaProducer010}.
+ */
+public class FlinkKafkaProducerTest {
Review comment:
I am doing that already. The `KafkaSerializationSchema` is supported only in the universal connector.
See https://github.com/apache/flink/pull/12468/files#diff-48ac804bdf7ea70d2485ad2351c26cfc
----------------------------------------------------------------
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] [flink] dawidwys merged pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
dawidwys merged pull request #12468:
URL: https://github.com/apache/flink/pull/12468
----------------------------------------------------------------
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] [flink] dawidwys commented on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
dawidwys commented on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638228498
cc @aljoscha
----------------------------------------------------------------
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] [flink] flinkbot commented on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638229997
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7 (Wed Jun 03 14:20:13 UTC 2020)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</details>
----------------------------------------------------------------
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] [flink] flinkbot edited a comment on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638243685
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651",
"triggerID" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"triggerType" : "PUSH"
}, {
"hash" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7bf026a4e23a89df952f6b361ab8fe435c0a612d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651)
* 7bf026a4e23a89df952f6b361ab8fe435c0a612d UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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] [flink] flinkbot edited a comment on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638243685
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651",
"triggerID" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2651)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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] [flink] flinkbot commented on pull request #12468: [FLINK-18075] Wrap the SerializationSchema in KafkaSerializationSchema in Kafka connector
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12468:
URL: https://github.com/apache/flink/pull/12468#issuecomment-638243685
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4ae1da7c5aee0ff73e4461f0d9235dd60857f1d7 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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