diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh index b689b2eea58d5..6f862b6763871 100755 --- a/bin/kafka-run-class.sh +++ b/bin/kafka-run-class.sh @@ -154,6 +154,10 @@ while [ $# -gt 0 ]; do DAEMON_MODE="true" shift ;; + --soft-file-limit) + ulimit -n $2 + shift 2 + ;; *) break ;; diff --git a/bin/kafka-server-start.sh b/bin/kafka-server-start.sh index dc01d46a13f16..79bb3da4528c3 100755 --- a/bin/kafka-server-start.sh +++ b/bin/kafka-server-start.sh @@ -16,7 +16,7 @@ if [ $# -lt 1 ]; then - echo "USAGE: $0 [-daemon] server.properties [--override property=value]*" + echo "USAGE: $0 [-daemon] [--soft-file-limit number] server.properties [--override property=value]*" exit 1 fi base_dir=$(dirname $0) @@ -37,6 +37,10 @@ case $COMMAND in EXTRA_ARGS="-daemon "$EXTRA_ARGS shift ;; + --soft-file-limit) + EXTRA_ARGS="--soft-file-limit ${2} "$EXTRA_ARGS + shift 2 + ;; *) ;; esac