kafka-1278; More flexible helper scripts; patched by Nathan Brown; reviewed by Jun Rao

This commit is contained in:
Nathan Brown 2014-02-25 09:37:15 -08:00 committed by Jun Rao
parent 00afb619cb
commit edbed2823f
8 changed files with 39 additions and 12 deletions

View File

@ -14,5 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export KAFKA_HEAP_OPTS="-Xmx512M"
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.consumer.ConsoleConsumer $@

View File

@ -14,5 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export KAFKA_HEAP_OPTS="-Xmx512M"
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.producer.ConsoleProducer $@

View File

@ -14,5 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export KAFKA_HEAP_OPTS="-Xmx512M"
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.perf.ConsumerPerformance $@

View File

@ -14,5 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export KAFKA_HEAP_OPTS="-Xmx512M"
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.perf.ProducerPerformance $@

View File

@ -23,9 +23,12 @@ fi
base_dir=$(dirname $0)/..
# create logs directory
LOG_DIR=$base_dir/logs
if [ ! -d $LOG_DIR ]; then
mkdir $LOG_DIR
if [ "x$LOG_DIR" = "x" ]; then
LOG_DIR="$base_dir/logs"
fi
if [ ! -d "$LOG_DIR" ]; then
mkdir -p "$LOG_DIR"
fi
if [ -z "$SCALA_VERSION" ]; then

View File

@ -20,8 +20,14 @@ then
exit 1
fi
base_dir=$(dirname $0)
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
fi
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi
EXTRA_ARGS="-name kafkaServer -loggc"

View File

@ -14,5 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
export KAFKA_HEAP_OPTS="-Xmx512M"
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
fi
exec $(dirname $0)/kafka-run-class.sh kafka.perf.SimpleConsumerPerformance $@

View File

@ -20,8 +20,14 @@ then
exit 1
fi
base_dir=$(dirname $0)
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
fi
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
fi
EXTRA_ARGS="-name zookeeper -loggc"