aboutsummaryrefslogtreecommitdiff
path: root/external/kafka/pom.xml
diff options
context:
space:
mode:
authorSean Owen <sowen@cloudera.com>2014-02-23 11:40:55 -0800
committerPatrick Wendell <pwendell@gmail.com>2014-02-23 11:40:55 -0800
commitc0ef3afa82c1eaf58ff5efec961540a74b639fd9 (patch)
tree99a806a2c69acfce8851fb814ca59d989c603435 /external/kafka/pom.xml
parent437b62fcb03cc84c6581eb667ddbddd817f7f9f0 (diff)
downloadspark-c0ef3afa82c1eaf58ff5efec961540a74b639fd9.tar.gz
spark-c0ef3afa82c1eaf58ff5efec961540a74b639fd9.tar.bz2
spark-c0ef3afa82c1eaf58ff5efec961540a74b639fd9.zip
SPARK-1071: Tidy logging strategy and use of log4j
Prompted by a recent thread on the mailing list, I tried and failed to see if Spark can be made independent of log4j. There are a few cases where control of the underlying logging is pretty useful, and to do that, you have to bind to a specific logger. Instead I propose some tidying that leaves Spark's use of log4j, but gets rid of warnings and should still enable downstream users to switch. The idea is to pipe everything (except log4j) through SLF4J, and have Spark use SLF4J directly when logging, and where Spark needs to output info (REPL and tests), bind from SLF4J to log4j. This leaves the same behavior in Spark. It means that downstream users who want to use something except log4j should: - Exclude dependencies on log4j, slf4j-log4j12 from Spark - Include dependency on log4j-over-slf4j - Include dependency on another logger X, and another slf4j-X - Recreate any log config that Spark does, that is needed, in the other logger's config That sounds about right. Here are the key changes: - Include the jcl-over-slf4j shim everywhere by depending on it in core. - Exclude dependencies on commons-logging from third-party libraries. - Include the jul-to-slf4j shim everywhere by depending on it in core. - Exclude slf4j-* dependencies from third-party libraries to prevent collision or warnings - Added missing slf4j-log4j12 binding to GraphX, Bagel module tests And minor/incidental changes: - Update to SLF4J 1.7.5, which happily matches Hadoop 2’s version and is a recommended update over 1.7.2 - (Remove a duplicate HBase dependency declaration in SparkBuild.scala) - (Remove a duplicate mockito dependency declaration that was causing warnings and bugging me) Author: Sean Owen <sowen@cloudera.com> Closes #570 from srowen/SPARK-1071 and squashes the following commits: 52eac9f [Sean Owen] Add slf4j-over-log4j12 dependency to core (non-test) and remove it from things that depend on core. 77a7fa9 [Sean Owen] SPARK-1071: Tidy logging strategy and use of log4j
Diffstat (limited to 'external/kafka/pom.xml')
-rw-r--r--external/kafka/pom.xml9
1 files changed, 4 insertions, 5 deletions
diff --git a/external/kafka/pom.xml b/external/kafka/pom.xml
index 630bbed5eb..fb37cd7988 100644
--- a/external/kafka/pom.xml
+++ b/external/kafka/pom.xml
@@ -61,6 +61,10 @@
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -78,11 +82,6 @@
<artifactId>junit-interface</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>