tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject tinkerpop git commit: TINKERPOP-1550 Made ganglia/graphite optional dependencies
Date Thu, 15 Jun 2017 16:13:17 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1550 [created] 945c23571


TINKERPOP-1550 Made ganglia/graphite optional dependencies

These dependencies must now be installed manually by users. Updated docs and the LICENSE for
Gremlin Server.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/945c2357
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/945c2357
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/945c2357

Branch: refs/heads/TINKERPOP-1550
Commit: 945c23571fcccafb95f7c129d368955cd068c430
Parents: dfba83f
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Jun 15 12:11:51 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Jun 15 12:11:51 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 .../src/reference/gremlin-applications.asciidoc | 20 +++++++++----
 docs/src/upgrade/release-3.3.x.asciidoc         |  9 ++++++
 gremlin-server/pom.xml                          |  3 ++
 gremlin-server/src/assembly/standalone.xml      | 19 ++++++------
 .../tinkerpop/gremlin/server/GremlinServer.java |  2 +-
 .../tinkerpop/gremlin/server/Settings.java      | 14 +--------
 .../gremlin/server/util/MetricManager.java      | 13 ++++++--
 gremlin-server/src/main/static/LICENSE          |  4 ---
 .../src/main/static/licenses/gmetric4j          | 31 --------------------
 pom.xml                                         |  2 ++
 11 files changed, 51 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 712b80a..45ce042 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Graphite and Ganglia are no longer packaged with the Gremlin Server distribution.
 * Renamed `RangeByIsCountStrategy` to `CountStrategy`.
 * Added more specific typing to various `__` traversal steps. E.g. `<A,Vertex>out()`
is `<Vertex,Vertex>out()`.
 * Updated Docker build scripts to include Python dependencies (NOTE: users should remove
any previously generated TinkerPop Docker images).

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 1c97b0c..e0e0196 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1184,11 +1184,7 @@ The following table describes the various YAML configuration options
that Gremli
 |writeBufferLowWaterMark | Once the number of bytes queued in the network send buffer exceeds
the `writeBufferHighWaterMark`, the channel will not become writeable again until the buffer
is drained and it drops below this value. |65536
 |=========================================================
 
-NOTE: Configuration of link:http://ganglia.sourceforge.net/[Ganglia] requires an additional
library that is not
-packaged with Gremlin Server due to its LGPL licensing that conflicts with the TinkerPop's
Apache 2.0 License.  To
-run Gremlin Server with Ganglia monitoring, download the `org.acplt:oncrpc` jar from
-link:http://repo1.maven.org/maven2/org/acplt/oncrpc/1.0.7/[here] and copy it to the Gremlin
Server `/lib` directory
-before starting the server.
+See the <<metrics,Metrics>> section for more information on how to configure
Ganglia and Graphite.
 
 [[opprocessor-configurations]]
 OpProcessor Configurations
@@ -1677,6 +1673,7 @@ important to use cases where server types need to be coerced to client
types (i.
 but not on the client).  Implementations should typically instantiate `ClassResolver` implementations
that are
 extensions of the `GryoClassResolver` as this class is important to most serialization tasks
in TinkerPop.
 
+[[metrics]]
 Metrics
 ^^^^^^^
 
@@ -1691,6 +1688,19 @@ metrics are exposed in a variety of ways:
 * link:https://en.wikipedia.org/wiki/Java_Management_Extensions[JMX]
 
 The configuration of each of these outputs is described in the Gremlin Server <<_configuring_2,
Configuring>> section.
+Note that Graphite and Ganglia are not included as part of the Gremlin Server distribution
and must be installed
+to the server manually.
+
+[source,text]
+----
+bin/gremlin-server.sh install com.codahale.metrics metrics-ganglia 3.0.2
+bin/gremlin-server.sh install com.codahale.metrics metrics-graphite 3.0.2
+----
+
+WARNING: Gremlin Server is built to work with Metrics 3.0.2. Usage of other versions may
lead to unexpected problems.
+
+NOTE: Installing Ganglia will include `org.acplt:oncrpc`, which is an LGPL licensed dependency.
+
 Regardless of the output, the metrics gathered are the same. Each metric is prefixed with
 `org.apache.tinkerpop.gremlin.server.GremlinServer` and the following metrics are reported:
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index dbb40b4..1573dd7 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -114,6 +114,15 @@ Changes to IO
 ** `RequestMessage`
 ** `ResponseMessage`
 
+Graphite and Ganglia
+^^^^^^^^^^^^^^^^^^^^
+
+Graphite and Ganglia are no longer packaged with the Gremlin Server distribution. They are
considered optional
+dependencies and therefore must be installed manually by the user.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1550[TINKERPOP-1550],
+link:http://tinkerpop.apache.org/docs/3.3.0/reference/#metrics[Reference Documentation -
Metrics]
+
 SelectStep Defaults to Pop.last
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-server/pom.xml b/gremlin-server/pom.xml
index 21088d6..ba2cbac 100644
--- a/gremlin-server/pom.xml
+++ b/gremlin-server/pom.xml
@@ -63,10 +63,12 @@ limitations under the License.
         <dependency>
             <groupId>com.codahale.metrics</groupId>
             <artifactId>metrics-graphite</artifactId>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>com.codahale.metrics</groupId>
             <artifactId>metrics-ganglia</artifactId>
+            <optional>true</optional>
         </dependency>
         <!-- TESTING -->
         <dependency>
@@ -124,6 +126,7 @@ limitations under the License.
         </testResources>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <version>2.4</version>
                 <executions>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/assembly/standalone.xml
----------------------------------------------------------------------
diff --git a/gremlin-server/src/assembly/standalone.xml b/gremlin-server/src/assembly/standalone.xml
index cbb862e..264d459 100644
--- a/gremlin-server/src/assembly/standalone.xml
+++ b/gremlin-server/src/assembly/standalone.xml
@@ -79,16 +79,20 @@ limitations under the License.
         <dependencySet>
             <outputDirectory>/lib</outputDirectory>
             <unpack>false</unpack>
-            <scope>compile</scope>
+            <scope>runtime</scope>
             <excludes>
                 <exclude>org.apache.tinkerpop:gremlin-groovy</exclude>
                 <exclude>org.apache.tinkerpop:tinkergraph-gremlin</exclude>
+                <exclude>com.codahale.metrics:metrics-graphite</exclude>
+                <exclude>com.codahale.metrics:metrics-ganglia</exclude>
+                <exclude>info.ganglia.gmetric4j:gmetric4j</exclude>
+                <!-- LGPL licensed org.acplt:oncrpc is excluded in the <dependencyManagement>
of the root pom -->
             </excludes>
         </dependencySet>
         <dependencySet>
             <outputDirectory>/ext/tinkergraph-gremlin/plugin</outputDirectory>
             <unpack>false</unpack>
-            <scope>compile</scope>
+            <scope>runtime</scope>
             <includes>
                 <include>org.apache.tinkerpop:tinkergraph-gremlin</include>
             </includes>
@@ -96,7 +100,7 @@ limitations under the License.
         <dependencySet>
             <outputDirectory>/ext/gremlin-groovy/plugin</outputDirectory>
             <unpack>false</unpack>
-            <scope>compile</scope>
+            <scope>runtime</scope>
             <includes>
                 <include>org.apache.tinkerpop:gremlin-groovy</include>
             </includes>
@@ -104,7 +108,7 @@ limitations under the License.
         <dependencySet>
             <outputDirectory>/ext/tinkergraph-gremlin/lib</outputDirectory>
             <unpack>false</unpack>
-            <scope>compile</scope>
+            <scope>runtime</scope>
             <includes>
                 <include>org.apache.tinkerpop:tinkergraph-gremlin</include>
             </includes>
@@ -112,15 +116,10 @@ limitations under the License.
         <dependencySet>
             <outputDirectory>/ext/gremlin-groovy/lib</outputDirectory>
             <unpack>false</unpack>
-            <scope>compile</scope>
+            <scope>runtime</scope>
             <includes>
                 <include>org.apache.tinkerpop:gremlin-groovy</include>
             </includes>
         </dependencySet>
-        <dependencySet>
-            <outputDirectory>/lib</outputDirectory>
-            <unpack>false</unpack>
-            <scope>provided</scope>
-        </dependencySet>
     </dependencySets>
 </assembly>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
index 50427fd..6b7604b 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
@@ -391,7 +391,7 @@ public class GremlinServer {
             if (config.enabled) {
                 try {
                     metrics.addGangliaReporter(config.host, config.port,
-                            config.optionalAddressingMode(), config.ttl, config.protocol31,
config.hostUUID, config.spoof, config.interval);
+                            config.addressingMode, config.ttl, config.protocol31, config.hostUUID,
config.spoof, config.interval);
                 } catch (IOException ioe) {
                     logger.warn("Error configuring the Ganglia Reporter.", ioe);
                 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
index d90f196..cb3ee2b 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
@@ -28,9 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
 import org.apache.tinkerpop.gremlin.server.auth.AllowAllAuthenticator;
 import org.apache.tinkerpop.gremlin.server.auth.Authenticator;
 import org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer;
+import org.apache.tinkerpop.gremlin.server.handler.AbstractAuthenticationHandler;
 import org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager;
-import info.ganglia.gmetric4j.gmetric.GMetric;
-import org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor;
 import org.apache.tinkerpop.gremlin.server.util.LifeCycleHook;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.yaml.snakeyaml.TypeDescription;
@@ -554,17 +553,6 @@ public class Settings {
             // default ganglia port
             this.port = 8649;
         }
-
-        public GMetric.UDPAddressingMode optionalAddressingMode() {
-            if (null == addressingMode)
-                return null;
-
-            try {
-                return GMetric.UDPAddressingMode.valueOf(addressingMode);
-            } catch (IllegalArgumentException iae) {
-                return null;
-            }
-        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
index 70957c9..5a14002 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/MetricManager.java
@@ -284,7 +284,7 @@ public enum MetricManager {
      *                     provided arguments
      */
     public synchronized void addGangliaReporter(final String groupOrHost, final int port,
-                                                final GMetric.UDPAddressingMode addressingMode,
final int ttl, final Boolean protocol31,
+                                                final String addressingMode, final int ttl,
final Boolean protocol31,
                                                 final UUID hostUUID, final String spoof,
final long reportIntervalInMS) throws IOException {
         if (null == groupOrHost || groupOrHost.isEmpty())
             throw new IllegalArgumentException("groupOrHost cannot be null or empty");
@@ -292,16 +292,23 @@ public enum MetricManager {
         if (null == addressingMode)
             throw new IllegalArgumentException("addressing mode cannot be null");
 
+        GMetric.UDPAddressingMode gmetricAddressingMode;
+        try {
+            gmetricAddressingMode = GMetric.UDPAddressingMode.valueOf(addressingMode);
+        } catch (IllegalArgumentException iae) {
+            throw new IllegalArgumentException("addressing mode must be MULTICAST or UNICAST");
+        }
+
         if (null != gangliaReporter) {
             log.debug("Metrics GangliaReporter already active; not creating another");
             return;
         }
 
         final boolean protocol = null == protocol31 ? true : protocol31;
-        GMetric ganglia = new GMetric(groupOrHost, port, addressingMode, ttl,
+        final GMetric ganglia = new GMetric(groupOrHost, port, gmetricAddressingMode, ttl,
                 protocol, hostUUID, spoof);
 
-        GangliaReporter.Builder b = GangliaReporter.forRegistry(getRegistry());
+        final GangliaReporter.Builder b = GangliaReporter.forRegistry(getRegistry());
 
         gangliaReporter = b.build(ganglia);
         gangliaReporter.start(reportIntervalInMS, TimeUnit.MILLISECONDS);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/main/static/LICENSE
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/LICENSE b/gremlin-server/src/main/static/LICENSE
index 78c3648..f86c257 100644
--- a/gremlin-server/src/main/static/LICENSE
+++ b/gremlin-server/src/main/static/LICENSE
@@ -233,10 +233,6 @@ The Apache TinkerPop project bundles the following components under the
MIT Lice
 Other Licenses
 ========================================================================
 
-The Apache TinkerPop project bundles the following components under the BSD/MIT License:
-
-     gmetric4j (info.ganglia.gmetric4j:gmetric4j:1.0.3 - http://github.com/ganglia/gmetric4j)
- for details, see licenses/gmetric4j
-
 The Apache TinkerPop project bundles the following components under the ISC License:
 
      jBCrypt (org.mindrot:jbcrypt:0.4 - https://github.com/djmdjm/jBCrypt) - for details,
see licenses/jbcrypt

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/gremlin-server/src/main/static/licenses/gmetric4j
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/static/licenses/gmetric4j b/gremlin-server/src/main/static/licenses/gmetric4j
deleted file mode 100644
index fb3227f..0000000
--- a/gremlin-server/src/main/static/licenses/gmetric4j
+++ /dev/null
@@ -1,31 +0,0 @@
-Title:		gmetric4j
-
-Copyright:
-
-Copyright (C) 2012 Daniel Pocock <daniel@pocock.com.au>
-Copyright (c) 2008-2011 Jasper Humphrey <jasper521@gmail.com>
-
-Based on:	jmxetric by Jasper Humphrey (BSD style license)
-
-License:             BSD terms
-
-    Copyright (C) 2010-2012 Daniel Pocock <daniel@pocock.com.au>
-    Copyright (c) 2008-2011 Jasper Humphrey <jasper521@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/945c2357/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a8f29fa..32bbd55 100644
--- a/pom.xml
+++ b/pom.xml
@@ -597,6 +597,7 @@ limitations under the License.
                 <groupId>com.codahale.metrics</groupId>
                 <artifactId>metrics-graphite</artifactId>
                 <version>${metrics.version}</version>
+                <optional>true</optional>
                 <exclusions>
                     <!-- conflict with jcl-over-slf4j-->
                     <exclusion>
@@ -609,6 +610,7 @@ limitations under the License.
                 <groupId>com.codahale.metrics</groupId>
                 <artifactId>metrics-ganglia</artifactId>
                 <version>${metrics.version}</version>
+                <optional>true</optional>
                 <exclusions>
                     <!-- conflict with jcl-over-slf4j-->
                     <exclusion>


Mime
View raw message