You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by mp...@apache.org on 2016/05/27 19:22:01 UTC

flume git commit: FLUME-2913. Don't strip SLF4J from imported classpaths

Repository: flume
Updated Branches:
  refs/heads/trunk 37ddd1b27 -> f4f15bee1


FLUME-2913. Don't strip SLF4J from imported classpaths

It is no longer necessary to strip other versions of SLF4J from
classpaths imported from hadoop or hbase. With recent versions of SLF4J,
when multiple connectors are found, one of them "wins" and the logging
does not break. A warning is printed once, however. This is acceptable
because having too long of a classpath can cause major problems on
systems with a low ARG_MAX.

(Bessenyei Bal�zs Don�t via Mike Percy)


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

Branch: refs/heads/trunk
Commit: f4f15bee1e4ba109c6a21f639668911a13241014
Parents: 37ddd1b
Author: Mike Percy <mp...@cloudera.com>
Authored: Fri May 27 12:10:41 2016 -0700
Committer: Mike Percy <mp...@cloudera.com>
Committed: Fri May 27 12:10:41 2016 -0700

----------------------------------------------------------------------
 bin/flume-ng | 31 ++-----------------------------
 1 file changed, 2 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/f4f15bee/bin/flume-ng
----------------------------------------------------------------------
diff --git a/bin/flume-ng b/bin/flume-ng
index e28723d..9bea01f 100755
--- a/bin/flume-ng
+++ b/bin/flume-ng
@@ -93,21 +93,7 @@ add_hadoop_paths() {
     # determine hadoop classpath
     HADOOP_CLASSPATH=$($HADOOP_IN_PATH classpath)
 
-    # hack up and filter hadoop classpath
-    local ELEMENTS=$(sed -e 's/:/ /g' <<<${HADOOP_CLASSPATH})
-    local ELEMENT
-    for ELEMENT in $ELEMENTS; do
-      local PIECE
-      for PIECE in $(echo $ELEMENT); do
-        if [[ $PIECE =~ slf4j-(api|log4j12).*\.jar ]]; then
-          info "Excluding $PIECE from classpath"
-          continue
-        else
-          FLUME_CLASSPATH="$FLUME_CLASSPATH:$PIECE"
-        fi
-      done
-    done
-
+    FLUME_CLASSPATH="$FLUME_CLASSPATH:$HADOOP_CLASSPATH"
   fi
 }
 add_HBASE_paths() {
@@ -142,20 +128,7 @@ add_HBASE_paths() {
     # determine HBASE classpath
     HBASE_CLASSPATH=$($HBASE_IN_PATH classpath)
 
-    # hack up and filter HBASE classpath
-    local ELEMENTS=$(sed -e 's/:/ /g' <<<${HBASE_CLASSPATH})
-    local ELEMENT
-    for ELEMENT in $ELEMENTS; do
-      local PIECE
-      for PIECE in $(echo $ELEMENT); do
-        if [[ $PIECE =~ slf4j-(api|log4j12).*\.jar ]]; then
-          info "Excluding $PIECE from classpath"
-          continue
-        else
-          FLUME_CLASSPATH="$FLUME_CLASSPATH:$PIECE"
-        fi
-      done
-    done
+    FLUME_CLASSPATH="$FLUME_CLASSPATH:$HBASE_CLASSPATH"
     FLUME_CLASSPATH="$FLUME_CLASSPATH:$HBASE_HOME/conf"
 
   fi