diff options
author | Patrick Wendell <pwendell@gmail.com> | 2014-03-11 11:16:59 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-03-11 11:16:59 -0700 |
commit | 16788a654246067fd966033b5dc9bc0d4c759b70 (patch) | |
tree | 5df5783341fa51fc538f67364eb62f8d2603cc97 /dev/audit-release/sbt_app_core | |
parent | 2a2c9645e4ea08cd1408151a33d2d52f6752404a (diff) | |
download | spark-16788a654246067fd966033b5dc9bc0d4c759b70.tar.gz spark-16788a654246067fd966033b5dc9bc0d4c759b70.tar.bz2 spark-16788a654246067fd966033b5dc9bc0d4c759b70.zip |
SPARK-1167: Remove metrics-ganglia from default build due to LGPL issues...
This patch removes Ganglia integration from the default build. It
allows users willing to link against LGPL code to use Ganglia
by adding build flags or linking against a new Spark artifact called
spark-ganglia-lgpl.
This brings Spark in line with the Apache policy on LGPL code
enumerated here:
https://www.apache.org/legal/3party.html#options-optional
Author: Patrick Wendell <pwendell@gmail.com>
Closes #108 from pwendell/ganglia and squashes the following commits:
326712a [Patrick Wendell] Responding to review feedback
5f28ee4 [Patrick Wendell] SPARK-1167: Remove metrics-ganglia from default build due to LGPL issues.
Diffstat (limited to 'dev/audit-release/sbt_app_core')
-rw-r--r-- | dev/audit-release/sbt_app_core/src/main/scala/SparkApp.scala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/dev/audit-release/sbt_app_core/src/main/scala/SparkApp.scala b/dev/audit-release/sbt_app_core/src/main/scala/SparkApp.scala index d49de8b73a..53fe43215e 100644 --- a/dev/audit-release/sbt_app_core/src/main/scala/SparkApp.scala +++ b/dev/audit-release/sbt_app_core/src/main/scala/SparkApp.scala @@ -17,6 +17,8 @@ package main.scala +import scala.util.Try + import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ @@ -31,6 +33,17 @@ object SimpleApp { println("Failed to parse log files with Spark") System.exit(-1) } - println("Test succeeded") + + // Regression test for SPARK-1167: Remove metrics-ganglia from default build due to LGPL issue + val foundConsole = Try(Class.forName("org.apache.spark.metrics.sink.ConsoleSink")).isSuccess + val foundGanglia = Try(Class.forName("org.apache.spark.metrics.sink.GangliaSink")).isSuccess + if (!foundConsole) { + println("Console sink not loaded via spark-core") + System.exit(-1) + } + if (foundGanglia) { + println("Ganglia sink was loaded via spark-core") + System.exit(-1) + } } } |