Class: Pinot::ZookeeperBrokerSelector

Inherits:
TableAwareBrokerSelector show all
Defined in:
lib/pinot/zookeeper_broker_selector.rb

Constant Summary collapse

BROKER_EXTERNAL_VIEW_PATH =

ZK path where Pinot stores broker external view

"/EXTERNALVIEW/brokerResource"

Constants inherited from TableAwareBrokerSelector

TableAwareBrokerSelector::OFFLINE_SUFFIX, TableAwareBrokerSelector::REALTIME_SUFFIX

Instance Method Summary collapse

Methods inherited from TableAwareBrokerSelector

#select_broker, #update_broker_data

Constructor Details

#initialize(zk_path:, zk_client: nil) ⇒ ZookeeperBrokerSelector

Returns a new instance of ZookeeperBrokerSelector.



11
12
13
14
15
# File 'lib/pinot/zookeeper_broker_selector.rb', line 11

def initialize(zk_path:, zk_client: nil)
  super()
  @zk_path   = zk_path      # e.g. "localhost:2181"
  @zk_client = zk_client    # injectable for testing
end

Instance Method Details

#initObject



17
18
19
20
21
# File 'lib/pinot/zookeeper_broker_selector.rb', line 17

def init
  @zk = @zk_client || build_zk_client
  fetch_and_update
  setup_watcher
end