You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2017/05/23 10:21:33 UTC
[GitHub] flink pull request #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/3968
[FLINK-6431] [metrics] Activate strict checkstyle in flink-metrics
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 6431_metrics_checkstyle
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3968.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 #3968
----
commit f1332af2d35c679b18d7228a70d3aee403e382df
Author: zentol <ch...@apache.org>
Date: 2017-05-02T15:31:27Z
[FLINK-6431] [metrics] Activate strict checkstyle in flink-metrics
----
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/3968#discussion_r118016840
--- Diff: flink-metrics/pom.xml ---
@@ -60,4 +60,42 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>6.19</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <configLocation>../tools/maven/strict-checkstyle.xml</configLocation>
--- End diff --
huh, I'm surprised that the configuration in streaming-java actually works.
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle in flin...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/3968
I've included the sources, change the path and added the removed comment. Moving on to the other 2 checkstyle PRs...
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/3968#discussion_r117989481
--- Diff: flink-metrics/pom.xml ---
@@ -60,4 +60,42 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>6.19</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <configLocation>../tools/maven/strict-checkstyle.xml</configLocation>
--- End diff --
Use "absolute" paths as `flink-streaming-java`?
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle in flin...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/3968
merging.
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle in flin...
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the issue:
https://github.com/apache/flink/pull/3968
+1 to merge after Travis gives the green light.
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/3968#discussion_r117987690
--- Diff: flink-metrics/flink-metrics-datadog/src/main/java/org/apache/flink/metrics/datadog/DatadogHttpReporter.java ---
@@ -146,44 +146,38 @@ public void report() {
}
/**
- * Get config tags from config 'metrics.reporter.dghttp.tags'
- * */
+ * Get config tags from config 'metrics.reporter.dghttp.tags'.
+ */
private List<String> getTagsFromConfig(String str) {
return Arrays.asList(str.split(","));
}
/**
- * Get tags from MetricGroup#getAllVariables(), excluding 'host'
- * */
+ * Get tags from MetricGroup#getAllVariables(), excluding 'host'.
+ */
private List<String> getTagsFromMetricGroup(MetricGroup metricGroup) {
List<String> tags = new ArrayList<>();
for (Map.Entry<String, String> entry: metricGroup.getAllVariables().entrySet()) {
- if(!entry.getKey().equals(HOST_VARIABLE)) {
+ if (!entry.getKey().equals(HOST_VARIABLE)) {
tags.add(getVariableName(entry.getKey()) + ":" + entry.getValue());
}
}
return tags;
}
- /**
- * Get host from MetricGroup#getAllVariables() if it exists; returns Null otherwise
- * */
private String getHostFromMetricGroup(MetricGroup metricGroup) {
return metricGroup.getAllVariables().get(HOST_VARIABLE);
}
- /**
- * Given "<xxx>", return "xxx"
--- End diff --
Could be helpful to leave a comment noting the removal of the leading and trailing angle brackets.
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/3968
---
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 #3968: [FLINK-6431] [metrics] Activate strict checkstyle ...
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on a diff in the pull request:
https://github.com/apache/flink/pull/3968#discussion_r117988627
--- Diff: flink-metrics/pom.xml ---
@@ -60,4 +60,42 @@ under the License.
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.puppycrawl.tools</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>6.19</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <configLocation>../tools/maven/strict-checkstyle.xml</configLocation>
+ <suppressionsLocation>../tools/maven/suppressions.xml</suppressionsLocation>
+ <logViolationsToConsole>true</logViolationsToConsole>
--- End diff --
includeTestSourceDirectory?
---
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.
---