[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16361941#comment-16361941 ] ASF GitHub Bot commented on FLINK-8626: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/5443 > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360982#comment-16360982 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/5443 Thanks for the review @zentol. Merging this PR. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360501#comment-16360501 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167502561 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/JobVertexBackPressureHandlerTest.java --- @@ -57,7 +57,7 @@ public void testGetPaths() { @Test public void testResponseNoStatsAvailable() throws Exception { ExecutionJobVertex jobVertex = mock(ExecutionJobVertex.class); - BackPressureStatsTracker statsTracker = mock(BackPressureStatsTracker.class); + BackPressureStatsTrackerImpl statsTracker = mock(BackPressureStatsTrackerImpl.class); --- End diff -- No unfortunately not, because the `JobVertexBackPressureHandler` requires `BackPresureStatsTrackerImpl` because of some methods which are not part of the interface. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360492#comment-16360492 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167501690 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java --- @@ -143,7 +143,7 @@ private final StackTraceSampleCoordinator stackTraceSamples; - private final BackPressureStatsTracker backPressureStatsTracker; + private final BackPressureStatsTrackerImpl backPressureStatsTrackerImpl; --- End diff -- True, this is changed in #5457. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16360493#comment-16360493 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167501726 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/JobVertexBackPressureHandlerTest.java --- @@ -57,7 +57,7 @@ public void testGetPaths() { @Test public void testResponseNoStatsAvailable() throws Exception { ExecutionJobVertex jobVertex = mock(ExecutionJobVertex.class); - BackPressureStatsTracker statsTracker = mock(BackPressureStatsTracker.class); + BackPressureStatsTrackerImpl statsTracker = mock(BackPressureStatsTrackerImpl.class); --- End diff -- Will change it. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359658#comment-16359658 ] ASF GitHub Bot commented on FLINK-8626: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167412925 --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/JobVertexBackPressureHandlerTest.java --- @@ -57,7 +57,7 @@ public void testGetPaths() { @Test public void testResponseNoStatsAvailable() throws Exception { ExecutionJobVertex jobVertex = mock(ExecutionJobVertex.class); - BackPressureStatsTracker statsTracker = mock(BackPressureStatsTracker.class); + BackPressureStatsTrackerImpl statsTracker = mock(BackPressureStatsTrackerImpl.class); --- End diff -- we could replace the mocks in this class with VoidBackPressureStatsTracker / lambda implementations. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359659#comment-16359659 ] ASF GitHub Bot commented on FLINK-8626: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167413109 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java --- @@ -143,7 +143,7 @@ private final StackTraceSampleCoordinator stackTraceSamples; - private final BackPressureStatsTracker backPressureStatsTracker; + private final BackPressureStatsTrackerImpl backPressureStatsTrackerImpl; --- End diff -- Does this only apply to the legacy handler? (It appears the JobManagerServices also exposes the implementation instead of the interface.) > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359655#comment-16359655 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167412844 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java --- @@ -143,7 +143,7 @@ private final StackTraceSampleCoordinator stackTraceSamples; - private final BackPressureStatsTracker backPressureStatsTracker; + private final BackPressureStatsTrackerImpl backPressureStatsTrackerImpl; --- End diff -- Actually not, because the legacy `JobVertexBackPressureHandler` needs to call methods of the implementation which are not part of the interface. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359656#comment-16359656 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167412847 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/VoidBackPressureStatsTracker.java --- @@ -0,0 +1,36 @@ +/* + * 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.runtime.rest.handler.legacy.backpressure; + +import org.apache.flink.runtime.executiongraph.ExecutionJobVertex; + +import java.util.Optional; + +/** + * {@link BackPressureStatsTracker} implementation which returns always no back pressure statistics. --- End diff -- Will do. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16359654#comment-16359654 ] ASF GitHub Bot commented on FLINK-8626: --- Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167412781 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java --- @@ -143,7 +143,7 @@ private final StackTraceSampleCoordinator stackTraceSamples; - private final BackPressureStatsTracker backPressureStatsTracker; + private final BackPressureStatsTrackerImpl backPressureStatsTrackerImpl; --- End diff -- True will change it. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16358589#comment-16358589 ] ASF GitHub Bot commented on FLINK-8626: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167268048 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/VoidBackPressureStatsTracker.java --- @@ -0,0 +1,36 @@ +/* + * 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.runtime.rest.handler.legacy.backpressure; + +import org.apache.flink.runtime.executiongraph.ExecutionJobVertex; + +import java.util.Optional; + +/** + * {@link BackPressureStatsTracker} implementation which returns always no back pressure statistics. --- End diff -- switch "returns" and "always"? > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16358588#comment-16358588 ] ASF GitHub Bot commented on FLINK-8626: --- Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5443#discussion_r167267838 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java --- @@ -143,7 +143,7 @@ private final StackTraceSampleCoordinator stackTraceSamples; - private final BackPressureStatsTracker backPressureStatsTracker; + private final BackPressureStatsTrackerImpl backPressureStatsTrackerImpl; --- End diff -- this should be typed to the interface, and the variable name should not end in "Impl". > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-8626) Introduce BackPressureStatsTracker interface
[ https://issues.apache.org/jira/browse/FLINK-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16358509#comment-16358509 ] ASF GitHub Bot commented on FLINK-8626: --- GitHub user tillrohrmann opened a pull request: https://github.com/apache/flink/pull/5443 [FLINK-8626] Introduce BackPressureStatsTracker interface ## What is the purpose of the change Renames BackPressureStatsTracker into BackPressureStatsTrackerImpl and introduce a BackPressureStatsTracker interface. This will make testing easier when we don't have to set up all the different components. ## 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, 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? (not applicable) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tillrohrmann/flink introduceBackPressureStatsTrackerInterface Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5443.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 #5443 commit 8e172aee75e9e0c81608ed7e6796bca1ea7d7544 Author: Till RohrmannDate: 2018-02-09T13:07:31Z [FLINK-8626] Introduce BackPressureStatsTracker interface Renames BackPressureStatsTracker into BackPressureStatsTrackerImpl and introduce a BackPressureStatsTracker interface. This will make testing easier when we don't have to set up all the different components. > Introduce BackPressureStatsTracker interface > > > Key: FLINK-8626 > URL: https://issues.apache.org/jira/browse/FLINK-8626 > Project: Flink > Issue Type: Improvement > Components: REST, Tests >Affects Versions: 1.5.0 >Reporter: Till Rohrmann >Assignee: Till Rohrmann >Priority: Minor > Fix For: 1.5.0 > > > In order to better test components like the {{JobMaster}} we should introduce > a {{BackPressureStatsTracker}} interface and rename the current > {{BackPressureStatsTracker}} class into {{BackPressureStatsTrackerImpl}}. > This will simplify testing where we have to set up all these things. -- This message was sent by Atlassian JIRA (v7.6.3#76005)