blob: 26e18720f1fb650aaf0fa782a6ca9992cbfdccbc [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
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
rdudyalab086cf32016-08-11 00:07:45 -040017#!/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
33if [ $# -lt 1 ];
34then
35 echo "USAGE: $0 [-daemon] server.properties"
36 exit 1
37fi
38base_dir=$(dirname $0)
39export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
40export KAFKA_HEAP_OPTS="-Xms256m -Xmx256m"
41
42EXTRA_ARGS="-name kafkaServer -loggc"
43
44COMMAND=$1
45case $COMMAND in
46 -daemon)
47 EXTRA_ARGS="-daemon "$EXTRA_ARGS
48 shift
49 ;;
50 *)
51 ;;
52esac
53
54exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka $@