sergeymazin commented on a change in pull request #312:
URL: https://github.com/apache/incubator-livy/pull/312#discussion_r499422034



##########
File path: bin/livy-server
##########
@@ -102,6 +102,10 @@ start_livy_server() {
     LIVY_CLASSPATH="$LIVY_CLASSPATH:$YARN_CONF_DIR"
   fi
 
+  if [ -n "$LIVY_LOG_DIR" ]; then
+    LIVY_SERVER_JAVA_OPTS="-DLIVY_LOG_DIR=$LIVY_LOG_DIR $LIVY_SERVER_JAVA_OPTS"

Review comment:
       Yep, you are right.
   
   This was added because if you define $LIVY_LOG_DIR in `livy-env.sh` it won't 
be passed to JVM as system variable and you won't be able to use it in 
log4j.properties out-of-the-box. You will need to set the same variable second 
time in $LIVY_SERVER_JAVA_OPTS. I think this is duplication and end user 
doesn't have to do it. This is not straightforward also that once you define 
$LIVY_LOG_DIR you have to pass same variable in $LIVY_SERVER_JAVA_OPTS.
   
   It took me some time to figure out why it doesn't work, so decided to make 
it easier for others also.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to