Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/18599#discussion_r126636677
--- Diff: sbin/spark-daemon.sh ---
@@ -78,6 +78,12 @@ spark_rotate_log ()
if [ -n "$2" ]; then
num=$2
fi
+
+ expr $num + 0 &>/dev/null
+ if [ $? -ne 0 ] || [ $num -eq 0 ]; then
--- End diff --
Are you trying to verify if `num` is a number? I get it but you would
already get a `bash` error in `$num -eq 0` if so and we don't otherwise
validate script input that way. Isn't this forcing num to be nonzero, when I
thought the issue was handling the case of 0 correctly?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]