You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fluo.apache.org by mw...@apache.org on 2017/10/06 19:11:00 UTC

[fluo] branch master updated: Fixed 'fluo exec' command (#937)

This is an automated email from the ASF dual-hosted git repository.

mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c3ef12  Fixed 'fluo exec' command (#937)
5c3ef12 is described below

commit 5c3ef12969689a5af68c058b1d6ab6da54b2979b
Author: Mike Walch <mw...@apache.org>
AuthorDate: Fri Oct 6 15:10:58 2017 -0400

    Fixed 'fluo exec' command (#937)
---
 .../src/main/java/org/apache/fluo/command/FluoExec.java        |  4 +---
 modules/distribution/src/main/scripts/fluo                     | 10 ++++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/modules/command/src/main/java/org/apache/fluo/command/FluoExec.java b/modules/command/src/main/java/org/apache/fluo/command/FluoExec.java
index 22bb407..bffc448 100644
--- a/modules/command/src/main/java/org/apache/fluo/command/FluoExec.java
+++ b/modules/command/src/main/java/org/apache/fluo/command/FluoExec.java
@@ -57,14 +57,12 @@ public class FluoExec {
     CommandUtil.verifyAppInitialized(fluoConfig);
     fluoConfig = FluoAdminImpl.mergeZookeeperConfig(fluoConfig);
 
-    Arrays.copyOfRange(args, 3, args.length);
-
     Class<?> clazz = Class.forName(className);
 
     // inject fluo configuration
     Guice.createInjector(new FluoConfigModule(clazz, fluoConfig));
 
     Method method = clazz.getMethod("main", String[].class);
-    method.invoke(null, (Object) Arrays.copyOfRange(args, 3, args.length));
+    method.invoke(null, (Object) Arrays.copyOfRange(args, 2, args.length));
   }
 }
diff --git a/modules/distribution/src/main/scripts/fluo b/modules/distribution/src/main/scripts/fluo
index 7934ad4..abf5576 100755
--- a/modules/distribution/src/main/scripts/fluo
+++ b/modules/distribution/src/main/scripts/fluo
@@ -222,8 +222,14 @@ classpath)
   ;;
 exec)
   if [ -f "$FLUO_CONN_PROPS" ]; then
-    setup_service "$2"
-    $JAVA org.apache.fluo.command.FluoExec "$FLUO_CONN_PROPS" "${@:2}"
+    app=$2
+    verify_app "$app"
+    check_conn_props
+    app_lib=$lib/apps/$app
+    mkdir -p "$app_lib"
+    $JAVA org.apache.fluo.command.FluoGetJars -d "$app_lib" -a "$app"
+    export CLASSPATH="$conf:$app_lib/*:$CLASSPATH"
+    $JAVA org.apache.fluo.command.FluoExec "${@:2}"
   else
     deprecated_verify "$2"
     export CLASSPATH="$APP_LIB_DIR/*:$CLASSPATH"

-- 
To stop receiving notification emails like this one, please contact
['"commits@fluo.apache.org" <co...@fluo.apache.org>'].