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/08/13 03:47:17 UTC

[GitHub] [flink] wulei0302 opened a new pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

wulei0302 opened a new pull request #13135:
URL: https://github.com/apache/flink/pull/13135


   <!--
   *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 Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - 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
   
   The `keyBy` usage of the examples and documents is no longer recommended, so update to the latest usage. This PR only updates docs and examples.
   
   
   ## Brief change log
   
   [a2a8717](https://github.com/apache/flink/commit/a2a8717c3738c883d0dfadf3f4b59289302bca21) : In the examples module, if it is java class, update '.keyBy("word")' to '.keyBy(value -> value.word)', update '.keyBy(0)' to '.keyBy(value -> value.f0)'; if it is scala class, update '.keyBy("word")' to '.keyBy(_.word)', update '.keyBy(0)' to '.keyBy(_._1)';
   [30d841e](https://github.com/apache/flink/commit/30d841ee0c5df64c98e1e572937427ccbac592b0) : update docs module like examples module
   [3b2c0da](https://github.com/apache/flink/commit/3b2c0da11cb0ec78cf24b14c0b70a88df7fff745) : adjust `etl.md` code comment
   
   ## 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): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - 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? no
     - If yes, how is the feature documented? no
   


----------------------------------------------------------------
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] wulei0302 commented on pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
wulei0302 commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-681803959


   Hey @dawidwys  Sorry to take your time, because this is my first time committing in the community, so thank you very much for your guidance. I have corrected it, and please help me see it again


----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #13135:
URL: https://github.com/apache/flink/pull/13135#discussion_r478289935



##########
File path: docs/dev/connectors/cassandra.zh.md
##########
@@ -231,7 +231,7 @@ DataStream<WordCount> result = text
                 }
             }
         })
-        .keyBy("word")
+        .keyBy(WordCount :: getWord)

Review comment:
       I will remove the whitespaces while merging though.
   ```suggestion
           .keyBy(WordCount::getWord)
   ```

##########
File path: docs/dev/connectors/cassandra.md
##########
@@ -231,7 +231,7 @@ DataStream<WordCount> result = text
                 }
             }
         })
-        .keyBy("word")
+        .keyBy(WordCount :: getWord)

Review comment:
       I will remove the whitespaces while merging though.
   ```suggestion
           .keyBy(WordCount::getWord)
   ```




----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #13135:
URL: https://github.com/apache/flink/pull/13135#discussion_r475409274



##########
File path: docs/dev/stream/operators/index.md
##########
@@ -104,8 +104,8 @@ dataStream.filter(new FilterFunction<Integer>() {
             <p>
             This transformation returns a <em>KeyedStream</em>, which is, among other things, required to use <a href="{{ site.baseurl }}/dev/stream/state/state.html#keyed-state">keyed state</a>. </p>
 {% highlight java %}
-dataStream.keyBy("someKey") // Key by field "someKey"
-dataStream.keyBy(0) // Key by the first element of a Tuple
+dataStream.keyBy(value -> value.someKey) // Key by field "someKey", or maybe use getSomeKey

Review comment:
       Let's just use the getter instead of putting it in the comment.
   ```suggestion
   dataStream.keyBy(value -> value.getSomeKey()) // Key by field "someKey"
   ```

##########
File path: docs/dev/types_serialization.md
##########
@@ -70,7 +70,7 @@ wordCounts.map(new MapFunction<Tuple2<String, Integer>, Integer>() {
     }
 });
 
-wordCounts.keyBy(0); // also valid .keyBy("f0")
+wordCounts.keyBy(value -> value.f0); // .keyBy(0) is @Deprecated

Review comment:
       In my opinion, there is no point in mentioning something that is deprecated. Let's just drop the comment.

##########
File path: docs/dev/types_serialization.md
##########
@@ -86,11 +86,11 @@ val input = env.fromElements(
     WordCount("hello", 1),
     WordCount("world", 2)) // Case Class Data Set
 
-input.keyBy("word")// key by field expression "word"
+input.keyBy(_.word) // .keyBy("word") is @Deprecated

Review comment:
       In my opinion, there is no point in mentioning something that is deprecated. Let's just drop the comment.

##########
File path: docs/dev/types_serialization.md
##########
@@ -238,7 +238,7 @@ Flink tries to infer a lot of information about the data types that are exchange
 Think about it like a database that infers the schema of tables. In most cases, Flink infers all necessary information seamlessly
 by itself. Having the type information allows Flink to do some cool things:
 
-* Using POJOs types and grouping / joining / aggregating them by referring to field names (like `dataSet.keyBy("username")`).
+* Using POJOs types and grouping / joining / aggregating them by referring to field names (like `dataSet.keyBy(value -> value.username)`).

Review comment:
       We are no longer referring to field names here. Honestly I am not sure if the point makes sense with the `KeySelector` only. The way I read this point is tells you can use field names, which we discourage nowadays.
   
   I'd rather remove the point whatsoever.

##########
File path: docs/dev/types_serialization.md
##########
@@ -86,11 +86,11 @@ val input = env.fromElements(
     WordCount("hello", 1),
     WordCount("world", 2)) // Case Class Data Set
 
-input.keyBy("word")// key by field expression "word"
+input.keyBy(_.word) // .keyBy("word") is @Deprecated
 
 val input2 = env.fromElements(("hello", 1), ("world", 2)) // Tuple2 Data Set
 
-input2.keyBy(0, 1) // key by field positions 0 and 1
+input2.keyBy(value => (value._1, value._2)) // key by field positions 0 and 1

Review comment:
       We don't key by positions here. Let's remove the comment.

##########
File path: docs/dev/types_serialization.md
##########
@@ -137,7 +137,7 @@ DataStream<WordWithCount> wordCounts = env.fromElements(
     new WordWithCount("hello", 1),
     new WordWithCount("world", 2));
 
-wordCounts.keyBy("word"); // key by field expression "word"
+wordCounts.keyBy(value -> value.word); // .keyBy("word") is @Deprecated

Review comment:
       In my opinion, there is no point in mentioning something that is deprecated. Let's just drop the comment.

##########
File path: docs/dev/types_serialization.md
##########
@@ -153,7 +153,7 @@ val input = env.fromElements(
     new WordWithCount("hello", 1),
     new WordWithCount("world", 2)) // Case Class Data Set
 
-input.keyBy("word")// key by field expression "word"
+input.keyBy(_.word) // .keyBy("word") is @Deprecated

Review comment:
       In my opinion, there is no point in mentioning something that is deprecated. Let's just drop the comment.

##########
File path: docs/learn-flink/etl.md
##########
@@ -149,6 +149,7 @@ this would mean doing some sort of GROUP BY with the `startCell`, while in Flink
 {% highlight java %}
 rides
     .flatMap(new NYCEnrichment())
+    // .keyBy("fieldname") is @Deprecated, could use .keyBy(value -> value.startCell) 

Review comment:
       Why don't we just use the correct version instead? Again I can't see a reason why we should even mention deprecated methods.




----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673236705


   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 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 (Thu Aug 13 03:49:09 UTC 2020)
   
    ✅no warnings
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e1c57258e3195ea5ce6d9db768e00e47932bb5d3 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481) 
   * 268f96176c36ecc84ba78a4813200f8e7d7b3b41 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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e1c57258e3195ea5ce6d9db768e00e47932bb5d3 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481) 
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877",
       "triggerID" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0d075ab14d2c9aac9d6f300522e51bb4dafce5d9",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5919",
       "triggerID" : "0d075ab14d2c9aac9d6f300522e51bb4dafce5d9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268f96176c36ecc84ba78a4813200f8e7d7b3b41 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877) 
   * 0d075ab14d2c9aac9d6f300522e51bb4dafce5d9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5919) 
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475) 
   * e1c57258e3195ea5ce6d9db768e00e47932bb5d3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481) 
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 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] wulei0302 commented on pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
wulei0302 commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673927211


   @wuchong hello, jark, Can you please review the code for me


----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877",
       "triggerID" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0d075ab14d2c9aac9d6f300522e51bb4dafce5d9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0d075ab14d2c9aac9d6f300522e51bb4dafce5d9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268f96176c36ecc84ba78a4813200f8e7d7b3b41 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877) 
   * 0d075ab14d2c9aac9d6f300522e51bb4dafce5d9 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] wulei0302 commented on pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
wulei0302 commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673286473


   > ## CI report:
   > * [3b2c0da](https://github.com/apache/flink/commit/3b2c0da11cb0ec78cf24b14c0b70a88df7fff745) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475)
   > 
   > Bot commands
   Sorry. This error is because of Idea's Optimize imports, I have fixed it


----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
dawidwys commented on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-681651901


   Hey @wulei0302 Could you please fix the PR's commit history. Right now there is a somewhat weird merge commit. Could you please fix it so that it is linear. Thx


----------------------------------------------------------------
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 closed pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
dawidwys closed pull request #13135:
URL: https://github.com/apache/flink/pull/13135


   


----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475) 
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475) 
   * e1c57258e3195ea5ce6d9db768e00e47932bb5d3 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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877",
       "triggerID" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e1c57258e3195ea5ce6d9db768e00e47932bb5d3 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481) 
   * 268f96176c36ecc84ba78a4813200f8e7d7b3b41 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877) 
   
   <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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5481",
       "triggerID" : "e1c57258e3195ea5ce6d9db768e00e47932bb5d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877",
       "triggerID" : "268f96176c36ecc84ba78a4813200f8e7d7b3b41",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268f96176c36ecc84ba78a4813200f8e7d7b3b41 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5877) 
   
   <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] wulei0302 commented on a change in pull request #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
wulei0302 commented on a change in pull request #13135:
URL: https://github.com/apache/flink/pull/13135#discussion_r477150966



##########
File path: docs/dev/stream/operators/index.md
##########
@@ -104,8 +104,8 @@ dataStream.filter(new FilterFunction<Integer>() {
             <p>
             This transformation returns a <em>KeyedStream</em>, which is, among other things, required to use <a href="{{ site.baseurl }}/dev/stream/state/state.html#keyed-state">keyed state</a>. </p>
 {% highlight java %}
-dataStream.keyBy("someKey") // Key by field "someKey"
-dataStream.keyBy(0) // Key by the first element of a Tuple
+dataStream.keyBy(value -> value.someKey) // Key by field "someKey", or maybe use getSomeKey

Review comment:
       @dawidwys  Thank you very much for your review. I am very happy for your good suggestions.  Please help me review it again.  thank you.




----------------------------------------------------------------
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 #13135: [FLINK-18797][docs][examples] Update deprecated forms of keyBy in docs and examples

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13135:
URL: https://github.com/apache/flink/pull/13135#issuecomment-673239905


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475",
       "triggerID" : "3b2c0da11cb0ec78cf24b14c0b70a88df7fff745",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3b2c0da11cb0ec78cf24b14c0b70a88df7fff745 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5475) 
   
   <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