Return-Path: X-Original-To: apmail-flume-commits-archive@www.apache.org Delivered-To: apmail-flume-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1CBB710C9B for ; Thu, 15 Aug 2013 01:24:50 +0000 (UTC) Received: (qmail 54792 invoked by uid 500); 15 Aug 2013 01:24:50 -0000 Delivered-To: apmail-flume-commits-archive@flume.apache.org Received: (qmail 54140 invoked by uid 500); 15 Aug 2013 01:24:49 -0000 Mailing-List: contact commits-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flume.apache.org Delivered-To: mailing list commits@flume.apache.org Received: (qmail 54035 invoked by uid 99); 15 Aug 2013 01:24:49 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 01:24:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id BF261836B2D; Thu, 15 Aug 2013 01:24:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hshreedharan@apache.org To: commits@flume.apache.org Message-Id: <563016838bb241aab3dd22ee9e2558db@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: FLUME-2161. Flume does not support spaces in -X java-opt command line args Date: Thu, 15 Aug 2013 01:24:48 +0000 (UTC) Updated Branches: refs/heads/trunk 507ff1371 -> 37e56e85b FLUME-2161. Flume does not support spaces in -X java-opt command line args (Mike Percy via Hari Shreedharan) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/37e56e85 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/37e56e85 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/37e56e85 Branch: refs/heads/trunk Commit: 37e56e85b08869e01dce98b95879a09f1bf57a92 Parents: 507ff13 Author: Hari Shreedharan Authored: Wed Aug 14 18:23:51 2013 -0700 Committer: Hari Shreedharan Committed: Wed Aug 14 18:23:51 2013 -0700 ---------------------------------------------------------------------- bin/flume-ng | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/37e56e85/bin/flume-ng ---------------------------------------------------------------------- diff --git a/bin/flume-ng b/bin/flume-ng index 65cc985..3a8a10d 100755 --- a/bin/flume-ng +++ b/bin/flume-ng @@ -224,7 +224,7 @@ run_flume() { if [ ${CLEAN_FLAG} -ne 0 ]; then set -x fi - $EXEC $JAVA_HOME/bin/java $JAVA_OPTS -cp "$FLUME_CLASSPATH" \ + $EXEC $JAVA_HOME/bin/java $JAVA_OPTS "${arr_java_props[@]}" -cp "$FLUME_CLASSPATH" \ -Djava.library.path=$FLUME_JAVA_LIBRARY_PATH "$FLUME_APPLICATION_CLASS" $* } @@ -241,7 +241,8 @@ LD_LIBRARY_PATH="" opt_conf="" opt_classpath="" opt_plugins_dirs="" -opt_java_props="" +arr_java_props=() +arr_java_props_ct=0 opt_dryrun="" mode=$1 @@ -301,10 +302,12 @@ while [ -n "$*" ] ; do shift ;; -D*) - opt_java_props="$opt_java_props $arg" + arr_java_props[arr_java_props_ct]=$arg + ((++arr_java_props_ct)) ;; -X*) - opt_java_props="$opt_java_props $arg" + arr_java_props[arr_java_props_ct]=$arg + ((++arr_java_props_ct)) ;; *) args="$args $arg" @@ -325,11 +328,6 @@ elif [ -f "$opt_conf/flume-env.sh" ]; then source "$opt_conf/flume-env.sh" fi -# append command-line java options to stock or env script JAVA_OPTS -if [ -n "${opt_java_props}" ]; then - JAVA_OPTS="${JAVA_OPTS} ${opt_java_props}" -fi - # prepend command-line classpath to env script classpath if [ -n "${opt_classpath}" ]; then if [ -n "${FLUME_CLASSPATH}" ]; then