Matteo Scandolo | eb0d11c | 2017-08-08 13:05:26 -0700 | [diff] [blame^] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
rdudyala | b086cf3 | 2016-08-11 00:07:45 -0400 | [diff] [blame] | 17 | #!/bin/bash |
| 18 | # Licensed to the Apache Software Foundation (ASF) under one or more |
| 19 | # contributor license agreements. See the NOTICE file distributed with |
| 20 | # this work for additional information regarding copyright ownership. |
| 21 | # The ASF licenses this file to You under the Apache License, Version 2.0 |
| 22 | # (the "License"); you may not use this file except in compliance with |
| 23 | # the License. You may obtain a copy of the License at |
| 24 | # |
| 25 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 26 | # |
| 27 | # Unless required by applicable law or agreed to in writing, software |
| 28 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 29 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 30 | # See the License for the specific language governing permissions and |
| 31 | # limitations under the License. |
| 32 | |
| 33 | if [ $# -lt 1 ]; |
| 34 | then |
| 35 | echo "USAGE: $0 [-daemon] server.properties" |
| 36 | exit 1 |
| 37 | fi |
| 38 | base_dir=$(dirname $0) |
| 39 | export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties" |
| 40 | export KAFKA_HEAP_OPTS="-Xms256m -Xmx256m" |
| 41 | |
| 42 | EXTRA_ARGS="-name kafkaServer -loggc" |
| 43 | |
| 44 | COMMAND=$1 |
| 45 | case $COMMAND in |
| 46 | -daemon) |
| 47 | EXTRA_ARGS="-daemon "$EXTRA_ARGS |
| 48 | shift |
| 49 | ;; |
| 50 | *) |
| 51 | ;; |
| 52 | esac |
| 53 | |
| 54 | exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka $@ |