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/04/14 06:24:19 UTC

[GitHub] [flink] curcur opened a new pull request #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle

curcur opened a new pull request #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725
 
 
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Travis CI to do that following [this guide](https://flink.apache.org/contributing/contribute-code.html#open-a-pull-request).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   This pull request is to provide a Kafka Source/Sink pair to simulate a KafkaShuffle that can:
   1. Read topics that are already partitioned by key and process them without partitioning them again (avoid shuffles); and
   2. Use this to decompose the job into smaller jobs and independent pipelined regions that failover independently.
   
   ## Brief Change Log
     - Extend Datastream API to allow user-defined SinkFunction to manipulate watermark
     - Kafka Shuffle Producer change
       - Write timestamp and watermark information together with a record in Kafka
       - Use `KeyGroupRangeAssignment` to assign records to different Kafka partitions
     - Kafka Shuffle Consumer change, Kafka Fechter Change
       - Each consumer read partitions equal to the key group indices that it got assigned. For now, the number of partitions is enforced to equal to the number of consumer parallelism.
       - KafkaShuffleFechter encapsulates the logic of record emitting and watermark emitting. 
   
   ## Verifying this change
   This change added tests:
   1. End-2-end tests
   2. partition assignment tests
   
   Some other tests are missing:
   1. Specific watermark tests
   2. failover tests
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes)
     - The serializers: (don't know)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)
   

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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410302920
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
 ##########
 @@ -108,6 +109,27 @@ public static boolean getBoolean(Properties config, String key, boolean defaultV
 		}
 	}
 
+	/**
+	 * Flatten a recursive {@link Properties} to a first level property map.
+	 * In some cases, {KafkaProducer#propsToMap} for example, Properties is used purely as a HashMap
+	 * without considering its default properties.
+	 *
+	 * @param config Properties to be flatten
+	 * @return Properties without defaults; all properties are put in the first-level
+	 */
+	public static Properties flatten(Properties config) {
 
 Review comment:
   Should be covered with one test case.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160159220) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410300111
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
 ##########
 @@ -19,6 +19,7 @@
 
 
 Review comment:
   On commit comment: 
   
   > {@link Properties} is used purely as a HashMap
   You probably meant Hashtable.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613250718
 
 
   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 e8a76909539302fd9935d912a07fb9ddb580c905 (Tue Apr 14 06:27:24 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-15670).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410295578
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
 ##########
 @@ -108,6 +109,27 @@ public static boolean getBoolean(Properties config, String key, boolean defaultV
 		}
 	}
 
+	/**
+	 * Flatten a recursive {@link Properties} to a first level property map.
+	 * In some cases, {KafkaProducer#propsToMap} for example, Properties is used purely as a HashMap
+	 * without considering its default properties.
+	 *
+	 * @param config Properties to be flatten
+	 * @return Properties without defaults; all properties are put in the first-level
+	 */
+	public static Properties flatten(Properties config) {
 
 Review comment:
   Although Properties can be used recursively, it's in a different way than most collections, so I found the name `flatten` very confusing at first. How about `resolveDefaults`?
   Then I'd also adjust the javadoc: `Flatten the default values of a Properties...`?
   

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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410296820
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
 ##########
 @@ -108,6 +109,27 @@ public static boolean getBoolean(Properties config, String key, boolean defaultV
 		}
 	}
 
+	/**
+	 * Flatten a recursive {@link Properties} to a first level property map.
+	 * In some cases, {KafkaProducer#propsToMap} for example, Properties is used purely as a HashMap
+	 * without considering its default properties.
+	 *
+	 * @param config Properties to be flatten
 
 Review comment:
   nit: flattened

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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410296442
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
 ##########
 @@ -108,6 +109,27 @@ public static boolean getBoolean(Properties config, String key, boolean defaultV
 		}
 	}
 
+	/**
+	 * Flatten a recursive {@link Properties} to a first level property map.
+	 * In some cases, {KafkaProducer#propsToMap} for example, Properties is used purely as a HashMap
+	 * without considering its default properties.
+	 *
+	 * @param config Properties to be flatten
+	 * @return Properties without defaults; all properties are put in the first-level
+	 */
+	public static Properties flatten(Properties config) {
 
 Review comment:
   On a second thought, wouldn't it make more sense to provide a correct `propsToMap` implementation? If it's only used in KafkaProducer, then we could fix it there. If not, I'd consider that function more useful than this `flatten`.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160336204",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 84dd0ae96bf17f9ed3b04fb1077162b2757f21b3 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160336204) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410311086
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
 ##########
 @@ -1333,6 +1334,32 @@ public ExecutionConfig getExecutionConfig() {
 		return sink;
 	}
 
+	/**
+	 * Adds a {@link StreamShuffleSink} to this DataStream. {@link StreamShuffleSink} is attached with
+	 * {@link SinkFunction} that can manipulate watermarks.
+	 *
+	 * @param sinkFunction
+	 * 			The object containing the sink's invoke function for both the element and watermark.
+	 * @return	The closed DataStream.
+	 */
+	public DataStreamSink<T> addSinkShuffle(SinkFunction<T> sinkFunction) {
 
 Review comment:
   Not necessary, see comment on `StreamShuffleSink`.

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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410311171
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/SinkTransformation.java
 ##########
 @@ -67,6 +68,22 @@ public SinkTransformation(
 		this(input, name, SimpleOperatorFactory.of(operator), parallelism);
 	}
 
+	/**
+	 * Creates a new {@code SinkTransformation} from the given input {@code Transformation}.
+	 *
+	 * @param input The input {@code Transformation}
+	 * @param name The name of the {@code Transformation}, this will be shown in Visualizations and the Log
+	 * @param operator The sink shuffle operator
+	 * @param parallelism The parallelism of this {@code SinkTransformation}
+	 */
+	public SinkTransformation(
 
 Review comment:
   Not necessary, see comment on `StreamShuffleSink`.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11725: [FLINK-15670] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160336204",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160159220) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434) 
   * 84dd0ae96bf17f9ed3b04fb1077162b2757f21b3 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160336204) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410310549
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkFunction.java
 ##########
 @@ -52,6 +54,20 @@ default void invoke(IN value, Context context) throws Exception {
 		invoke(value);
 	}
 
+	/**
+	 * This function is called for every watermark.
+	 *
+	 * <p>You have to override this method when implementing a {@code SinkFunction} to handle watermark.
+	 * This method has to be used together with {@link StreamShuffleSink}
+	 *
+	 * @param watermark The watermark to handle.
+	 * @throws Exception This method may throw exceptions. Throwing an exception will cause the operation
+	 *                   to fail and may trigger recovery.
+	 */
+	default void invoke(Watermark watermark) throws Exception {
 
 Review comment:
   `invoke` is not a very good name as that is only associated with the core functionality of a function. I'd probably name it like `processWatermark`, `setWatermark`, or `onWatermark`. Probably a good idea to get more feedback from some API maintainer.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160159220) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434) 
   * 84dd0ae96bf17f9ed3b04fb1077162b2757f21b3 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160159220) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160336204",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494",
       "triggerID" : "84dd0ae96bf17f9ed3b04fb1077162b2757f21b3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 84dd0ae96bf17f9ed3b04fb1077162b2757f21b3 Travis: [FAILURE](https://travis-ci.com/github/flink-ci/flink/builds/160336204) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7494) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] curcur commented on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
curcur commented on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613859547
 
 
   add Java 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


With regards,
Apache Git Services

[GitHub] [flink] AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#discussion_r410307365
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamShuffleSink.java
 ##########
 @@ -0,0 +1,104 @@
+/*
+ * 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.api.operators;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.streaming.api.functions.sink.SinkFunction;
+import org.apache.flink.streaming.api.watermark.Watermark;
+import org.apache.flink.streaming.runtime.streamrecord.LatencyMarker;
+import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
+import org.apache.flink.streaming.runtime.tasks.ProcessingTimeService;
+
+/**
+ * A {@link StreamOperator} for executing {@link SinkFunction} that handle both elements and watermarks.
+ *
+ * @param <IN>
+ */
+@Internal
+public class StreamShuffleSink<IN> extends AbstractUdfStreamOperator<Object, SinkFunction<IN>>
 
 Review comment:
   Except for watermark forwarding, this is a 1:1 copy of `StreamSink`, correct? So at the very least, this should subclass `StreamSink` and only have special treatment for that.
   
   However, we can do much better, since you added `invoke(mark)` to all `SinkFunctions` why not give it a no-op implementation and always invoke it in `StreamSink`?

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle
URL: https://github.com/apache/flink/pull/11725#issuecomment-613252882
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160159220",
       "triggerID" : "e8a76909539302fd9935d912a07fb9ddb580c905",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e8a76909539302fd9935d912a07fb9ddb580c905 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160159220) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7434) 
   
   <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


With regards,
Apache Git Services