kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1278; More flexible helper scripts; patched by Nathan Brown; reviewed by Jun Rao
Date Tue, 25 Feb 2014 17:37:21 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 00afb619c -> edbed2823


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


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/edbed282
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/edbed282
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/edbed282

Branch: refs/heads/trunk
Commit: edbed2823fc3e4948bb56ec3bee02fe4ad1bbdca
Parents: 00afb61
Author: Nathan Brown <nbrown.us@gmail.com>
Authored: Tue Feb 25 09:37:15 2014 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Feb 25 09:37:15 2014 -0800

----------------------------------------------------------------------
 bin/kafka-console-consumer.sh          |  5 ++++-
 bin/kafka-console-producer.sh          |  4 +++-
 bin/kafka-consumer-perf-test.sh        |  4 +++-
 bin/kafka-producer-perf-test.sh        |  4 +++-
 bin/kafka-run-class.sh                 |  9 ++++++---
 bin/kafka-server-start.sh              | 10 ++++++++--
 bin/kafka-simple-consumer-perf-test.sh |  5 ++++-
 bin/zookeeper-server-start.sh          | 10 ++++++++--
 8 files changed, 39 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-console-consumer.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-console-consumer.sh b/bin/kafka-console-consumer.sh
index b86ea56..e410dde 100755
--- a/bin/kafka-console-consumer.sh
+++ b/bin/kafka-console-consumer.sh
@@ -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 $@

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-console-producer.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-console-producer.sh b/bin/kafka-console-producer.sh
index ec0f21f..cd8ce62 100755
--- a/bin/kafka-console-producer.sh
+++ b/bin/kafka-console-producer.sh
@@ -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 $@

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-consumer-perf-test.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-consumer-perf-test.sh b/bin/kafka-consumer-perf-test.sh
index 38c56c7..4ed3ed9 100755
--- a/bin/kafka-consumer-perf-test.sh
+++ b/bin/kafka-consumer-perf-test.sh
@@ -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 $@

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-producer-perf-test.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-producer-perf-test.sh b/bin/kafka-producer-perf-test.sh
index d75ab7d..b4efc29 100755
--- a/bin/kafka-producer-perf-test.sh
+++ b/bin/kafka-producer-perf-test.sh
@@ -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 $@

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-run-class.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-run-class.sh b/bin/kafka-run-class.sh
index b54de9f..d2fc8c0 100755
--- a/bin/kafka-run-class.sh
+++ b/bin/kafka-run-class.sh
@@ -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

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-server-start.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-server-start.sh b/bin/kafka-server-start.sh
index 7050649..1737d0c 100755
--- a/bin/kafka-server-start.sh
+++ b/bin/kafka-server-start.sh
@@ -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"
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/kafka-simple-consumer-perf-test.sh
----------------------------------------------------------------------
diff --git a/bin/kafka-simple-consumer-perf-test.sh b/bin/kafka-simple-consumer-perf-test.sh
index c466cc8..2d3e3d3 100755
--- a/bin/kafka-simple-consumer-perf-test.sh
+++ b/bin/kafka-simple-consumer-perf-test.sh
@@ -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 $@

http://git-wip-us.apache.org/repos/asf/kafka/blob/edbed282/bin/zookeeper-server-start.sh
----------------------------------------------------------------------
diff --git a/bin/zookeeper-server-start.sh b/bin/zookeeper-server-start.sh
index 2e7be74..d968786 100755
--- a/bin/zookeeper-server-start.sh
+++ b/bin/zookeeper-server-start.sh
@@ -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"
 


Mime
View raw message