Updated Branches:
  refs/heads/flume-1.3.0 5d4903a93 -> 19d815e49

FLUME-1582. flume-ng script should set LD_LIBRARY_PATH

(Hari Shreedharan 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/19d815e4
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/19d815e4
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/19d815e4

Branch: refs/heads/flume-1.3.0
Commit: 19d815e4971ca0c35f0039f7c261751067998e9a
Parents: 5d4903a
Author: Mike Percy <[email protected]>
Authored: Sun Sep 16 23:34:39 2012 -0700
Committer: Mike Percy <[email protected]>
Committed: Sun Sep 16 23:41:43 2012 -0700

----------------------------------------------------------------------
 bin/flume-ng |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/19d815e4/bin/flume-ng
----------------------------------------------------------------------
diff --git a/bin/flume-ng b/bin/flume-ng
index 121adf3..37b446b 100755
--- a/bin/flume-ng
+++ b/bin/flume-ng
@@ -160,6 +160,14 @@ add_HBASE_paths() {
   fi
 }
 
+set_LD_LIBRARY_PATH(){
+#Append the FLUME_JAVA_LIBRARY_PATH to whatever the user may have specified in
+#flume-env.sh
+  if [ -n "${FLUME_JAVA_LIBRARY_PATH}" ]; then
+    export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${FLUME_JAVA_LIBRARY_PATH}"
+  fi
+}
+
 display_help() {
   cat <<EOF
 Usage: $0 <command> [options]...
@@ -219,6 +227,7 @@ run_flume() {
 FLUME_CLASSPATH=""
 FLUME_JAVA_LIBRARY_PATH=""
 JAVA_OPTS="-Xmx20m"
+LD_LIBRARY_PATH=""
 
 opt_conf=""
 opt_classpath=""
@@ -350,6 +359,7 @@ if [ -n "$opt_conf" ]; then
   FLUME_CLASSPATH="$opt_conf:$FLUME_CLASSPATH"
 fi
 
+set_LD_LIBRARY_PATH
 # allow dryrun
 EXEC="exec"
 if [ -n "${opt_dryrun}" ]; then

Reply via email to