Sha256: 78316cc382eea3e7c2139f3f00e6581f802abe58e1e3636e9153bd82602edc09
Contents?: true
Size: 649 Bytes
Versions: 14
Compression:
Stored size: 649 Bytes
Contents
zk_dir = File.join CELLECT_ROOT, 'tmp/zookeeper' `rm -rf #{ zk_dir }; mkdir -p #{ zk_dir }` CELLECT_ZK_CONFIG = "#{ zk_dir }/zoo.cfg" File.open(CELLECT_ZK_CONFIG, 'w') do |out| out.puts <<-TEXT tickTime=2000 initLimit=10 syncLimit=5 dataDir=#{ zk_dir } clientPort=21811 forceSync=no snapCount=1000000 TEXT end if `echo ruok | nc 127.0.0.1 21811`.chomp == 'imok' pid = `ps aux | grep -e 'Cellect[\/]tmp[\/]zookeeper'`.split[1] puts "Killing rogue zookeeper process: #{ pid }..." `kill -s TERM #{ pid }` sleep 1 end `zkServer start #{ CELLECT_ZK_CONFIG } > /dev/null 2>&1` ENV['ZK_URL'] = 'localhost:21811'
Version data entries
14 entries across 14 versions & 2 rubygems