This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.6 by this push:
     new 6706197  [FLINK-10998][metrics][ganglia] Remove Ganglia reporter
6706197 is described below

commit 6706197cd032e598e311fd7c0865a7d17a5306f0
Author: zentol <ches...@apache.org>
AuthorDate: Fri Nov 23 15:30:50 2018 +0100

    [FLINK-10998][metrics][ganglia] Remove Ganglia reporter
---
 docs/monitoring/metrics.md                         | 28 -------
 flink-dist/src/main/assemblies/opt.xml             |  7 --
 flink-metrics/flink-metrics-ganglia/pom.xml        | 97 ----------------------
 .../flink/metrics/ganglia/GangliaReporter.java     | 84 -------------------
 flink-metrics/pom.xml                              |  1 -
 5 files changed, 217 deletions(-)

diff --git a/docs/monitoring/metrics.md b/docs/monitoring/metrics.md
index 50511dc..8944171 100644
--- a/docs/monitoring/metrics.md
+++ b/docs/monitoring/metrics.md
@@ -622,34 +622,6 @@ An example for such a list would be 
`host=localhost,job_name=MyJob,task_name=MyT
 
 The domain thus identifies a metric class, while the key-property list 
identifies one (or multiple) instances of that metric.
 
-### Ganglia (org.apache.flink.metrics.ganglia.GangliaReporter)
-
-In order to use this reporter you must copy 
`/opt/flink-metrics-ganglia-{{site.version}}.jar` into the `/lib` folder
-of your Flink distribution.
-
-Parameters:
-
-- `host` - the gmond host address configured under `udp_recv_channel.bind` in 
`gmond.conf`
-- `port` - the gmond port configured under `udp_recv_channel.port` in 
`gmond.conf`
-- `tmax` - soft limit for how long an old metric should be retained
-- `dmax` - hard limit for how long an old metric should be retained
-- `ttl` - time-to-live for transmitted UDP packets
-- `addressingMode` - UDP addressing mode to use (UNICAST/MULTICAST)
-
-Example configuration:
-
-{% highlight yaml %}
-
-metrics.reporter.gang.class: org.apache.flink.metrics.ganglia.GangliaReporter
-metrics.reporter.gang.host: localhost
-metrics.reporter.gang.port: 8649
-metrics.reporter.gang.tmax: 60
-metrics.reporter.gang.dmax: 0
-metrics.reporter.gang.ttl: 1
-metrics.reporter.gang.addressingMode: MULTICAST
-
-{% endhighlight %}
-
 ### Graphite (org.apache.flink.metrics.graphite.GraphiteReporter)
 
 In order to use this reporter you must copy 
`/opt/flink-metrics-graphite-{{site.version}}.jar` into the `/lib` folder
diff --git a/flink-dist/src/main/assemblies/opt.xml 
b/flink-dist/src/main/assemblies/opt.xml
index 136f0f3..bf2b476 100644
--- a/flink-dist/src/main/assemblies/opt.xml
+++ b/flink-dist/src/main/assemblies/opt.xml
@@ -92,13 +92,6 @@
                </file>
 
                <file>
-                       
<source>../flink-metrics/flink-metrics-ganglia/target/flink-metrics-ganglia-${project.version}-jar-with-dependencies.jar</source>
-                       <outputDirectory>opt/</outputDirectory>
-                       
<destName>flink-metrics-ganglia-${project.version}.jar</destName>
-                       <fileMode>0644</fileMode>
-               </file>
-
-               <file>
                        
<source>../flink-metrics/flink-metrics-graphite/target/flink-metrics-graphite-${project.version}-jar-with-dependencies.jar</source>
                        <outputDirectory>opt/</outputDirectory>
                        
<destName>flink-metrics-graphite-${project.version}.jar</destName>
diff --git a/flink-metrics/flink-metrics-ganglia/pom.xml 
b/flink-metrics/flink-metrics-ganglia/pom.xml
deleted file mode 100644
index b6f147d..0000000
--- a/flink-metrics/flink-metrics-ganglia/pom.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-
-       <modelVersion>4.0.0</modelVersion>
-
-       <parent>
-               <groupId>org.apache.flink</groupId>
-               <artifactId>flink-metrics</artifactId>
-               <version>1.6-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-
-       <artifactId>flink-metrics-ganglia</artifactId>
-       <name>flink-metrics-ganglia</name>
-
-       <dependencies>
-               <dependency>
-                       <groupId>org.apache.flink</groupId>
-                       <artifactId>flink-annotations</artifactId>
-                       <version>${project.version}</version>
-                       <scope>provided</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.flink</groupId>
-                       <artifactId>flink-metrics-core</artifactId>
-                       <version>${project.version}</version>
-                       <scope>provided</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.flink</groupId>
-                       <artifactId>flink-metrics-dropwizard</artifactId>
-                       <version>${project.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>info.ganglia.gmetric4j</groupId>
-                       <artifactId>gmetric4j</artifactId>
-                       <version>1.0.7</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>io.dropwizard.metrics</groupId>
-                       <artifactId>metrics-core</artifactId>
-                       <version>${metrics.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>io.dropwizard.metrics</groupId>
-                       <artifactId>metrics-ganglia</artifactId>
-                       <version>${metrics.version}</version>
-               </dependency>
-       </dependencies>
-
-       <build>
-               <plugins>
-                       <plugin>
-                               <artifactId>maven-assembly-plugin</artifactId>
-                               <version>2.4</version>
-                               <configuration>
-                                       <descriptorRefs>
-                                               
<descriptorRef>jar-with-dependencies</descriptorRef>
-                                       </descriptorRefs>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>make-assembly</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>single</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
-</project>
diff --git 
a/flink-metrics/flink-metrics-ganglia/src/main/java/org/apache/flink/metrics/ganglia/GangliaReporter.java
 
b/flink-metrics/flink-metrics-ganglia/src/main/java/org/apache/flink/metrics/ganglia/GangliaReporter.java
deleted file mode 100644
index 8719901..0000000
--- 
a/flink-metrics/flink-metrics-ganglia/src/main/java/org/apache/flink/metrics/ganglia/GangliaReporter.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.metrics.ganglia;
-
-import org.apache.flink.annotation.PublicEvolving;
-import org.apache.flink.dropwizard.ScheduledDropwizardReporter;
-import org.apache.flink.metrics.MetricConfig;
-
-import com.codahale.metrics.ScheduledReporter;
-import info.ganglia.gmetric4j.gmetric.GMetric;
-
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-
-/**
- * This class acts as a factory for the {@link 
com.codahale.metrics.ganglia.GangliaReporter} and allows using it as a
- * Flink reporter.
- */
-@PublicEvolving
-public class GangliaReporter extends ScheduledDropwizardReporter {
-
-       public static final String ARG_DMAX = "dmax";
-       public static final String ARG_TMAX = "tmax";
-       public static final String ARG_TTL = "ttl";
-       public static final String ARG_MODE_ADDRESSING = "addressingMode";
-
-       @Override
-       public ScheduledReporter getReporter(MetricConfig config) {
-
-               try {
-                       String host = config.getString(ARG_HOST, null);
-                       int port = config.getInteger(ARG_PORT, -1);
-                       if (host == null || host.length() == 0 || port < 1) {
-                               throw new IllegalArgumentException("Invalid 
host/port configuration. Host: " + host + " Port: " + port);
-                       }
-                       String addressingMode = 
config.getString(ARG_MODE_ADDRESSING, "MULTICAST");
-                       int ttl = config.getInteger(ARG_TTL, 1);
-                       GMetric gMetric = new GMetric(host, port, 
GMetric.UDPAddressingMode.valueOf(addressingMode), ttl);
-
-                       String prefix = config.getString(ARG_PREFIX, null);
-                       String conversionRate = 
config.getString(ARG_CONVERSION_RATE, null);
-                       String conversionDuration = 
config.getString(ARG_CONVERSION_DURATION, null);
-                       int dMax = config.getInteger(ARG_DMAX, 0);
-                       int tMax = config.getInteger(ARG_TMAX, 60);
-
-                       com.codahale.metrics.ganglia.GangliaReporter.Builder 
builder =
-                               
com.codahale.metrics.ganglia.GangliaReporter.forRegistry(registry);
-
-                       if (prefix != null) {
-                               builder.prefixedWith(prefix);
-                       }
-                       if (conversionRate != null) {
-                               
builder.convertRatesTo(TimeUnit.valueOf(conversionRate));
-                       }
-                       if (conversionDuration != null) {
-                               
builder.convertDurationsTo(TimeUnit.valueOf(conversionDuration));
-                       }
-                       builder.withDMax(dMax);
-                       builder.withTMax(tMax);
-
-                       log.info("Configured GangliaReporter with {host:{}, 
port:{}, dmax:{}, tmax:{}, ttl:{}, addressingMode:{}}",
-                               host, port, dMax, tMax, ttl, addressingMode);
-                       return builder.build(gMetric);
-               } catch (IOException e) {
-                       throw new RuntimeException("Error while instantiating 
GangliaReporter.", e);
-               }
-       }
-}
diff --git a/flink-metrics/pom.xml b/flink-metrics/pom.xml
index a0aba30..b063066 100644
--- a/flink-metrics/pom.xml
+++ b/flink-metrics/pom.xml
@@ -36,7 +36,6 @@ under the License.
        <modules>
                <module>flink-metrics-core</module>
                <module>flink-metrics-dropwizard</module>
-               <module>flink-metrics-ganglia</module>
                <module>flink-metrics-graphite</module>
                <module>flink-metrics-jmx</module>
                <module>flink-metrics-prometheus</module>

Reply via email to