You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by dawidwys <gi...@git.apache.org> on 2017/05/24 12:08:38 UTC

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

GitHub user dawidwys opened a pull request:

    https://github.com/apache/flink/pull/3976

    [FLINK-6137][cep] Activate strict checkstyle for flink-cep

    Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your changes.
    
    - [ ] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [ ] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dawidwys/flink flink-cep-checkstyle

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3976.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 #3976
    
----
commit b64e850d085e752c2665bfd71200f7d562159016
Author: zentol <ch...@apache.org>
Date:   2017-05-23T19:11:38Z

    [FLINK-6691][checkstyle] Add separate block for scala imports

commit b890094b521b61df778ed95f2a03b7d1623707cc
Author: Dawid Wysakowicz <da...@getindata.com>
Date:   2017-05-24T12:07:23Z

    [FLINK-6137] Activate strict checkstyle for flink-cep

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118265038
  
    --- Diff: flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/pattern/Pattern.scala ---
    @@ -271,7 +271,7 @@ class Pattern[T , F <: T](jPattern: JPattern[T, F]) {
         * {{{A1 A2 B}}} appears, this will generate patterns:
         * {{{A1 B}}} and {{{A1 A2 B}}}. See also {{{allowCombinations()}}}.
         *
    -    * @return The same pattern with a [[Quantifier.ONE_OR_MORE()]] quantifier applied.
    +    * @return The same pattern with a [[Quantifier.oneOrMore()]] quantifier applied.
    --- End diff --
    
    ok then. :)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3976: [FLINK-6137][cep] Activate strict checkstyle for flink-ce...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3976
  
    You can rebase this PR now to get rid of the scala import block commit.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118236003
  
    --- Diff: flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/pattern/Pattern.scala ---
    @@ -271,7 +271,7 @@ class Pattern[T , F <: T](jPattern: JPattern[T, F]) {
         * {{{A1 A2 B}}} appears, this will generate patterns:
         * {{{A1 B}}} and {{{A1 A2 B}}}. See also {{{allowCombinations()}}}.
         *
    -    * @return The same pattern with a [[Quantifier.ONE_OR_MORE()]] quantifier applied.
    +    * @return The same pattern with a [[Quantifier.oneOrMore()]] quantifier applied.
    --- End diff --
    
    I hesitated with this change as it is, as i understand it, an API breaking change. @kl0u What's your take on this?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118240567
  
    --- Diff: flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPRescalingTest.java ---
    @@ -64,7 +68,7 @@ public Integer getKey(Event value) throws Exception {
     
     		Event startEvent1 = new Event(7, "start", 1.0);
     		SubEvent middleEvent1 = new SubEvent(7, "foo", 1.0, 10.0);
    -		Event endEvent1=  new Event(7, "end", 1.0);
    +		Event endEvent1 =  new Event(7, "end", 1.0);
    --- End diff --
    
    Agree, I tried removing them. I must have missed this one.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118240404
  
    --- Diff: flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/pattern/Pattern.scala ---
    @@ -271,7 +271,7 @@ class Pattern[T , F <: T](jPattern: JPattern[T, F]) {
         * {{{A1 A2 B}}} appears, this will generate patterns:
         * {{{A1 B}}} and {{{A1 A2 B}}}. See also {{{allowCombinations()}}}.
         *
    -    * @return The same pattern with a [[Quantifier.ONE_OR_MORE()]] quantifier applied.
    +    * @return The same pattern with a [[Quantifier.oneOrMore()]] quantifier applied.
    --- End diff --
    
    It is not an API change. The Quantifier class is an internal one.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118265027
  
    --- Diff: flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/pattern/Pattern.scala ---
    @@ -271,7 +271,7 @@ class Pattern[T , F <: T](jPattern: JPattern[T, F]) {
         * {{{A1 A2 B}}} appears, this will generate patterns:
         * {{{A1 B}}} and {{{A1 A2 B}}}. See also {{{allowCombinations()}}}.
         *
    -    * @return The same pattern with a [[Quantifier.ONE_OR_MORE()]] quantifier applied.
    +    * @return The same pattern with a [[Quantifier.oneOrMore()]] quantifier applied.
    --- End diff --
    
    ok then.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118244967
  
    --- Diff: flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAITCase.java ---
    @@ -1896,21 +1898,21 @@ public boolean filter(Event value) throws Exception {
     		List<List<Event>> resultingPatterns = feedNFA(inputEvents, nfa);
     
     		compareMaps(resultingPatterns, Lists.<List<Event>>newArrayList(
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent2, ConsecutiveData.end),
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent3, ConsecutiveData.end),
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.end)
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.MIDDLE_EVENT_1, ConsecutiveData.MIDDLE_EVENT_2, ConsecutiveData.END),
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.MIDDLE_EVENT_1, ConsecutiveData.MIDDLE_EVENT_3, ConsecutiveData.END),
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.END)
     		));
     	}
     
     	///////////////////////////////         Consecutive           ////////////////////////////////////////
     
     	private static class ConsecutiveData {
    -		static final Event startEvent = new Event(40, "c", 1.0);
    -		static final Event middleEvent1 = new Event(41, "a", 2.0);
    -		static final Event middleEvent2 = new Event(42, "a", 3.0);
    -		static final Event middleEvent3 = new Event(43, "a", 4.0);
    -		static final Event middleEvent4 = new Event(43, "a", 5.0);
    -		static final Event end = new Event(44, "b", 5.0);
    +		static final Event START_EVENT = new Event(40, "c", 1.0);
    --- End diff --
    
    Did not know that. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118236987
  
    --- Diff: flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPRescalingTest.java ---
    @@ -64,7 +68,7 @@ public Integer getKey(Event value) throws Exception {
     
     		Event startEvent1 = new Event(7, "start", 1.0);
     		SubEvent middleEvent1 = new SubEvent(7, "foo", 1.0, 10.0);
    -		Event endEvent1=  new Event(7, "end", 1.0);
    +		Event endEvent1 =  new Event(7, "end", 1.0);
    --- End diff --
    
    while we're at it we can remove the second space after `=`. I remember there were other occurrences of this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/3976


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3976: [FLINK-6137][cep] Activate strict checkstyle for flink-ce...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3976
  
    You'll have to rebase this again to resolve some conflicts, #3978 has fixed a bug in the CEPOperatorTest and hardened it a bit.
    
    The suppressLoadErrors commit has also been merged.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3976: [FLINK-6137][cep] Activate strict checkstyle for flink-ce...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3976
  
    I've rebased this locally and will merge this after going through the changes once again.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3976: [FLINK-6137][cep] Activate strict checkstyle for f...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3976#discussion_r118236599
  
    --- Diff: flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAITCase.java ---
    @@ -1896,21 +1898,21 @@ public boolean filter(Event value) throws Exception {
     		List<List<Event>> resultingPatterns = feedNFA(inputEvents, nfa);
     
     		compareMaps(resultingPatterns, Lists.<List<Event>>newArrayList(
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent2, ConsecutiveData.end),
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.middleEvent1, ConsecutiveData.middleEvent3, ConsecutiveData.end),
    -				Lists.newArrayList(ConsecutiveData.startEvent, ConsecutiveData.end)
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.MIDDLE_EVENT_1, ConsecutiveData.MIDDLE_EVENT_2, ConsecutiveData.END),
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.MIDDLE_EVENT_1, ConsecutiveData.MIDDLE_EVENT_3, ConsecutiveData.END),
    +				Lists.newArrayList(ConsecutiveData.START_EVENT, ConsecutiveData.END)
     		));
     	}
     
     	///////////////////////////////         Consecutive           ////////////////////////////////////////
     
     	private static class ConsecutiveData {
    -		static final Event startEvent = new Event(40, "c", 1.0);
    -		static final Event middleEvent1 = new Event(41, "a", 2.0);
    -		static final Event middleEvent2 = new Event(42, "a", 3.0);
    -		static final Event middleEvent3 = new Event(43, "a", 4.0);
    -		static final Event middleEvent4 = new Event(43, "a", 5.0);
    -		static final Event end = new Event(44, "b", 5.0);
    +		static final Event START_EVENT = new Event(40, "c", 1.0);
    --- End diff --
    
    you can make these private, then you don't have to rename them.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---