You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by ro...@apache.org on 2022/09/20 03:19:42 UTC

[incubator-uniffle] branch master updated: Output the stderr and stdout to output file in startup script (#226)

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

roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new e5c3412c Output the stderr and stdout to output file in startup script (#226)
e5c3412c is described below

commit e5c3412c19ed3006dfd7af7426f4b6e869c6faf0
Author: Junfan Zhang <ju...@outlook.com>
AuthorDate: Tue Sep 20 11:19:36 2022 +0800

    Output the stderr and stdout to output file in startup script (#226)
    
    ### What changes were proposed in this pull request?
    Output the stderr and stdout to output file in startup script
    
    ### Why are the changes needed?
    I found it cause some netty exception logs output to the console due to lacking this PR. It's better to collect these uncaught logs into file and will be helpful to diagnose.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    
    ### How was this patch tested?
    No need.
---
 bin/start-coordinator.sh    | 3 ++-
 bin/start-shuffle-server.sh | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/start-coordinator.sh b/bin/start-coordinator.sh
index 7abc7baa..a7a02808 100644
--- a/bin/start-coordinator.sh
+++ b/bin/start-coordinator.sh
@@ -30,6 +30,7 @@ COORDINATOR_CONF_FILE="${RSS_CONF_DIR}/coordinator.conf"
 JAR_DIR="${RSS_HOME}/jars"
 LOG_CONF_FILE="${RSS_CONF_DIR}/log4j.properties"
 LOG_PATH="${RSS_LOG_DIR}/coordinator.log"
+OUT_PATH="${RSS_LOG_DIR}/coordinator.out"
 
 MAIN_CLASS="org.apache.uniffle.coordinator.CoordinatorServer"
 
@@ -69,7 +70,7 @@ else
   exit 1
 fi
 
-$RUNNER $ARGS $JVM_ARGS -cp $CLASSPATH $MAIN_CLASS --conf "$COORDINATOR_CONF_FILE" $@ &
+$RUNNER $ARGS $JVM_ARGS -cp $CLASSPATH $MAIN_CLASS --conf "$COORDINATOR_CONF_FILE" $@ &> $OUT_PATH &
 
 get_pid_file_name coordinator
 echo $! >${RSS_PID_DIR}/${pid_file}
diff --git a/bin/start-shuffle-server.sh b/bin/start-shuffle-server.sh
index b82e23ba..4fd6d6ae 100644
--- a/bin/start-shuffle-server.sh
+++ b/bin/start-shuffle-server.sh
@@ -30,6 +30,7 @@ SHUFFLE_SERVER_CONF_FILE="${RSS_CONF_DIR}/server.conf"
 JAR_DIR="${RSS_HOME}/jars"
 LOG_CONF_FILE="${RSS_CONF_DIR}/log4j.properties"
 LOG_PATH="${RSS_LOG_DIR}/shuffle_server.log"
+OUT_PATH="${RSS_LOG_DIR}/shuffle_server.out"
 
 set +o nounset
 if [ -z "$XMX_SIZE" ]; then
@@ -90,7 +91,7 @@ else
   exit 1
 fi
 
-$RUNNER $ARGS $JVM_ARGS $JAVA_LIB_PATH -cp $CLASSPATH $MAIN_CLASS --conf "$SHUFFLE_SERVER_CONF_FILE" $@ &
+$RUNNER $ARGS $JVM_ARGS $JAVA_LIB_PATH -cp $CLASSPATH $MAIN_CLASS --conf "$SHUFFLE_SERVER_CONF_FILE" $@ &> $OUT_PATH &
 
 get_pid_file_name shuffle-server
 echo $! >${RSS_PID_DIR}/${pid_file}