class TestKafka::Zookeeper
Attributes
port[R]
Public Class Methods
new(kafka_path, tmp_dir, port)
click to toggle source
# File lib/test_kafka/zookeeper.rb, line 5 def initialize(kafka_path, tmp_dir, port) @port = port @jr = JavaRunner.new("zookeeper", tmp_dir, "org.apache.zookeeper.server.quorum.QuorumPeerMain", port, kafka_path, "dataDir" => "#{tmp_dir}/zookeeper", "clientPort" => port, "maxClientCnxns" => 0) end
Public Instance Methods
pid()
click to toggle source
# File lib/test_kafka/zookeeper.rb, line 27 def pid @jr.pid end
start()
click to toggle source
# File lib/test_kafka/zookeeper.rb, line 19 def start @jr.start end
stop()
click to toggle source
# File lib/test_kafka/zookeeper.rb, line 23 def stop @jr.stop end
with_interruption(&block)
click to toggle source
# File lib/test_kafka/zookeeper.rb, line 31 def with_interruption(&block) @jr.with_interruption(&block) end