[GitHub] flink pull request #3485: FLINK-5976 [tests] Deduplicate Tokenizer in tests
Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3485 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3485: FLINK-5976 [tests] Deduplicate Tokenizer in tests
Github user liuyuzhong7 commented on a diff in the pull request: https://github.com/apache/flink/pull/3485#discussion_r104826690 --- Diff: flink-tests/src/test/java/org/apache/flink/test/util/Tokenizer.java --- @@ -0,0 +1,17 @@ +package org.apache.flink.test.util; --- End diff -- @zentol fixed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3485: FLINK-5976 [tests] Deduplicate Tokenizer in tests
Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/3485#discussion_r104650335 --- Diff: flink-tests/src/test/java/org/apache/flink/test/util/Tokenizer.java --- @@ -0,0 +1,17 @@ +package org.apache.flink.test.util; --- End diff -- this file is missing the apache license. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #3485: FLINK-5976 [tests] Deduplicate Tokenizer in tests
GitHub user liuyuzhong7 opened a pull request: https://github.com/apache/flink/pull/3485 FLINK-5976 [tests] Deduplicate Tokenizer in tests There are some duplicate code like this in flink-test, I think refactor this will be better. ``` public final class Tokenizer implements FlatMapFunction> { @Override public void flatMap(String value, Collector > out) { // normalize and split the line String[] tokens = value.toLowerCase().split("\\W+"); // emit the pairs for (String token : tokens) { if (token.length() > 0) { out.collect(new Tuple2 (token, 1)); } } } } ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/liuyuzhong7/flink FLINK-5976 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3485.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3485 commit db4192110b1b610846f50527a5fc67450d3d1cca Author: liuyuzhong7 Date: 2017-03-07T11:15:40Z FLINK-5976 [tests] Deduplicate Tokenizer in tests --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---