kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/vagrant/zk.sh

Path
kafka_neu-1778570057504.zip-extract/kafka-4.2.0-src/vagrant/zk.sh
Status
scanned
Type
file
Name
zk.sh
Extension
.sh
Programming language
Bash
Mime type
text/x-shellscript
File type
Bourne-Again shell script, ASCII text executable
Tag

      
    
Rootfs path

      
    
Size
1893 (1.8 KB)
MD5
414a075dedd90c6af22bbc319633f62a
SHA1
a4544854a02b910e0ddf64cd559dd1c43e478290
SHA256
04f52e890c0a8c92c3dd77370541bace69f385e013e002caf06467656b038144
SHA512

      
    
SHA1_git
e8c690a060e32bb4a7dcc07c2815b251ab092ff4
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
zk.sh | 1.8 KB |

#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Usage: zk.sh <zkid> <num_zk> set -e ZKID=$1 NUM_ZK=$2 JMX_PORT=$3 kafka_dir=/opt/kafka-dev cd $kafka_dir cp $kafka_dir/config/zookeeper.properties $kafka_dir/config/zookeeper-$ZKID.properties echo "initLimit=5" >> $kafka_dir/config/zookeeper-$ZKID.properties echo "syncLimit=2" >> $kafka_dir/config/zookeeper-$ZKID.properties echo "quorumListenOnAllIPs=true" >> $kafka_dir/config/zookeeper-$ZKID.properties for i in `seq 1 $NUM_ZK`; do echo "server.${i}=zk${i}:2888:3888" >> $kafka_dir/config/zookeeper-$ZKID.properties done mkdir -p /tmp/zookeeper echo "$ZKID" > /tmp/zookeeper/myid echo "Killing ZooKeeper" bin/zookeeper-server-stop.sh || true sleep 5 # Because zookeeper-server-stop.sh doesn't actually wait echo "Starting ZooKeeper" if [[ -n $JMX_PORT ]]; then export JMX_PORT=$JMX_PORT export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=zk$ZKID -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false " fi bin/zookeeper-server-start.sh config/zookeeper-$ZKID.properties 1>> /tmp/zk.log 2>> /tmp/zk.log &
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
41.61
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9