mikewalch commented on a change in pull request #883: Fixes #842 Support 
multiple ways for running Fluo applications
URL: https://github.com/apache/incubator-fluo/pull/883#discussion_r131157047
 
 

 ##########
 File path: modules/distribution/src/main/config/fluo-env.sh
 ##########
 @@ -11,11 +11,41 @@
 # or implied. See the License for the specific language governing permissions 
and limitations under
 # the License.
 
-# Sets HADOOP_PREFIX if it is not already set.  Please modify the
-# export statement to use the correct directory.  Remove the test
-# statement to override any previously set environment.
+## Before fluo-env.sh is loaded, these environment variables are set and can 
be used in this file:
 
-test -z "$HADOOP_PREFIX" && export HADOOP_PREFIX=/path/to/hadoop
+# cmd - Command that is being called such as oracle, worker, etc.
+# app - Fluo application name 
+# basedir - Root of Fluo installation
+# conf - Directory containing Fluo configuration
+# lib - Directory containing Fluo libraries
+
+############################
+# Variables that must be set
+############################
+
+## Fluo logs directory. Referenced by logger config.
+export FLUO_LOG_DIR="${FLUO_LOG_DIR:-${basedir}/logs}"
+## Hadoop installation
+export HADOOP_PREFIX="${HADOOP_PREFIX:-/path/to/hadoop}"
+## Fluo connection properties
+export FLUO_CONN_PROPS="${FLUO_CONN_PROPS:-${conf}/fluo-conn.properties}"
+## Fluo log4j configuration
+export FLUO_LOG4J_CONFIG="${FLUO_LOG4J_CONFIG:-${conf}/log4j.properties}"
+
+##################################################################
+# Build JAVA_OPTS variable. Defaults below work but can be edited.
+##################################################################
+
+export FLUO_LOG_ID="${cmd}_$(hostname)_$(date +%s)"
+
+JAVA_OPTS=("-Dlog4j.configuration=file:${FLUO_LOG4J_CONFIG}"
 
 Review comment:
   Fixed.. changed `JAVA_OPTS` to `SERVICE_OPTS`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to