lib/druid/client.rb in jruby-druid-1.0.0.pre.rc4 vs lib/druid/client.rb in jruby-druid-2.0.0.edge.1
- old
+ new
@@ -1,29 +1,23 @@
module Druid
class Client
- include Druid::Logging
include Druid::Queries::Core
include Druid::Queries::Datasource
include Druid::Queries::Task
attr_reader :broker,
:config,
:coordinator,
:overlord,
- :writer
+ :writer,
+ :zk
def initialize(options = {})
@config = Druid::Configuration.new(options)
- @broker = Druid::Node::Broker.new(config)
- @coordinator = Druid::Node::Coordinator.new(config)
- setup_logger
- @overlord = Druid::Node::Overlord.new(config)
- @writer = Druid::Writer::Base.new(config)
- end
-
- private
-
- def setup_logger
- logger.set_level(config.log_level)
+ @zk = Druid::ZK.new(config)
+ @broker = Druid::Node::Broker.new(config, zk)
+ @coordinator = Druid::Node::Coordinator.new(config, zk)
+ @overlord = Druid::Node::Overlord.new(config, zk)
+ @writer = Druid::Writer.new(config, zk)
end
end
end