You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/11/29 06:40:02 UTC

[GitHub] [incubator-celeborn] zwangsheng opened a new pull request, #1020: [IMPROVEMENT] Improve celeborn script logic

zwangsheng opened a new pull request, #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020

   # [IMPROVEMENT] Improve celeborn script logic
   
   ### What changes were proposed in this pull request?
   Improve celeborn scripts `celeborn-daemon.sh` and `celeborn-class.sh` print log and logic.
   
   ### Why are the changes needed?
   
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   ### What are the items that need reviewer attention?
   1. We may left celeborn-test which used to test if we can touch file in log dir.
   2. `CELEBORN_PRINT_LAUNCH_COMMAND` was not used in `celeborn-daemon.sh`, move it to `celeborn-class.sh` and set default to 0 for help developer debug java command. 
   
   ### Related issues.
   
   
   ### Related pull requests.
   
   
   ### How was this patch tested?
   
   
   /cc @related-reviewer
   
   /assign @main-reviewer
   


-- 
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: dev-unsubscribe@celeborn.apache.org

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


[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1020: [IMPROVEMENT] Improve celeborn script logic

Posted by GitBox <gi...@apache.org>.
waitinfuture commented on code in PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020#discussion_r1034403608


##########
sbin/celeborn-daemon.sh:
##########
@@ -74,36 +74,34 @@ celeborn_rotate_log ()
     log=$1;
     num=5;
     if [ -n "$2" ]; then
-	num=$2
+	    num=$2
     fi
     if [ -f "$log" ]; then # rotate logs
-	while [ $num -gt 1 ]; do
-	    prev=`expr $num - 1`
-	    [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
-	    num=$prev
-	done
-	mv "$log" "$log.$num";
+	    while [ $num -gt 1 ]; do
+	      prev=`expr $num - 1`
+	      [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+	      num=$prev

Review Comment:
   Seems there are tabs in the beginning of the line, we can replace with whitespace



-- 
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: dev-unsubscribe@celeborn.apache.org

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


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1020: [IMPROVEMENT] Improve celeborn script logic

Posted by GitBox <gi...@apache.org>.
zwangsheng commented on code in PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020#discussion_r1034353157


##########
sbin/celeborn-daemon.sh:
##########
@@ -74,36 +74,34 @@ celeborn_rotate_log ()
     log=$1;
     num=5;
     if [ -n "$2" ]; then
-	num=$2
+	    num=$2
     fi
     if [ -f "$log" ]; then # rotate logs
-	while [ $num -gt 1 ]; do
-	    prev=`expr $num - 1`
-	    [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
-	    num=$prev
-	done
-	mv "$log" "$log.$num";
+	    while [ $num -gt 1 ]; do
+	      prev=`expr $num - 1`
+	      [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+	      num=$prev

Review Comment:
   Code behave differently in local and Github.
   
   ![WX20221129-144133](https://user-images.githubusercontent.com/52876270/204457488-75b5fa8b-e435-42ce-a505-4d4d2f03591b.png)



-- 
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: dev-unsubscribe@celeborn.apache.org

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


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1020: [IMPROVEMENT] Improve celeborn script logic

Posted by GitBox <gi...@apache.org>.
zwangsheng commented on code in PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020#discussion_r1034407638


##########
sbin/celeborn-daemon.sh:
##########
@@ -74,36 +74,34 @@ celeborn_rotate_log ()
     log=$1;
     num=5;
     if [ -n "$2" ]; then
-	num=$2
+	    num=$2
     fi
     if [ -f "$log" ]; then # rotate logs
-	while [ $num -gt 1 ]; do
-	    prev=`expr $num - 1`
-	    [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
-	    num=$prev
-	done
-	mv "$log" "$log.$num";
+	    while [ $num -gt 1 ]; do
+	      prev=`expr $num - 1`
+	      [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+	      num=$prev

Review Comment:
   done



-- 
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: dev-unsubscribe@celeborn.apache.org

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


[GitHub] [incubator-celeborn] waitinfuture merged pull request #1020: [IMPROVEMENT] Improve celeborn script logic

Posted by GitBox <gi...@apache.org>.
waitinfuture merged PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020


-- 
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: dev-unsubscribe@celeborn.apache.org

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


[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1020: [IMPROVEMENT] Improve celeborn script logic

Posted by GitBox <gi...@apache.org>.
waitinfuture commented on code in PR #1020:
URL: https://github.com/apache/incubator-celeborn/pull/1020#discussion_r1034404515


##########
sbin/celeborn-daemon.sh:
##########
@@ -74,36 +74,34 @@ celeborn_rotate_log ()
     log=$1;
     num=5;
     if [ -n "$2" ]; then
-	num=$2
+	    num=$2
     fi
     if [ -f "$log" ]; then # rotate logs
-	while [ $num -gt 1 ]; do
-	    prev=`expr $num - 1`
-	    [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
-	    num=$prev
-	done
-	mv "$log" "$log.$num";
+	    while [ $num -gt 1 ]; do
+	      prev=`expr $num - 1`
+	      [ -f "$log.$prev" ] && mv "$log.$prev" "$log.$num"
+	      num=$prev

Review Comment:
   ![image](https://user-images.githubusercontent.com/948245/204470774-b117a23b-0aaf-4b4c-8f5f-b5c0123d3b0d.png)
   



-- 
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: dev-unsubscribe@celeborn.apache.org

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