You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/07/08 07:00:39 UTC

[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #29: Optimize the bash script

jerqi commented on code in PR #29:
URL: https://github.com/apache/incubator-uniffle/pull/29#discussion_r916516680


##########
conf/log4j.properties:
##########
@@ -22,7 +22,7 @@ log4j.appender.console.target=System.err
 log4j.appender.console.layout=org.apache.log4j.PatternLayout
 log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
 log4j.appender.RollingAppender=org.apache.log4j.RollingFileAppender
-log4j.appender.RollingAppender.File=./logs/rss.log
+log4j.appender.RollingAppender.File=${LOG_PATH}

Review Comment:
   If we use `log.path`, we should modify this place,  too.



##########
bin/start-coordinator.sh:
##########
@@ -32,8 +32,13 @@ cd $COORDINATOR_HOME
 source "${COORDINATOR_HOME}/bin/rss-env.sh"
 source "${COORDINATOR_HOME}/bin/utils.sh"
 
+if [ -z "$HADOOP_HOME" ]; then
+  echo "No env HADOOP_HOME."
+  exit 1
+fi
+

Review Comment:
   I verify this patch offline, find this error
   <img width="545" alt="企业微信截图_1e5275e2-2a30-4989-b128-841b3140f665" src="https://user-images.githubusercontent.com/8159038/177933943-61a5b5c7-0d86-45c3-94c5-9453e1676fbc.png">
   When I add
   ```
   export JAVA_HOME
   ```
   here.
   It's ok.



##########
bin/start-coordinator.sh:
##########
@@ -71,10 +71,13 @@ JVM_ARGS=" -server \
           -XX:InitiatingHeapOccupancyPercent=45 "
 
 ARGS=""
-if [ -f ./conf/log4j.properties ]; then
-  ARGS="$ARGS -Dlog4j.configuration=file:./conf/log4j.properties"
+
+LOG_CONF_FILE="./conf/log4j.properties"
+LOG_PATH="./logs/coordinator.log"
+if [ -f ${LOG_CONF_FILE} ]; then
+  ARGS="$ARGS -Dlog4j.configuration=file:${LOG_CONF_FILE} -DLOG_PATH=${LOG_PATH}"

Review Comment:
   `-Dlog.path=${LOG_PATH}` may be better. The style will be consistent with `-Dlog4j.configuration`.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org