Метод | Описание | |
---|---|---|
Dispose ( ) : void |
Closes underlying connection to ZooKeeper
|
|
GetAllBrokerInfo ( ) : Broker>.IDictionary |
Gets a mapping from broker ID to the host and port for all brokers
|
|
GetBrokerInfo ( int brokerId ) : |
Gets the host and port information for the broker identified by the given broker ID
|
|
GetBrokerPartitionInfo ( string topic ) : SortedSet |
Gets a mapping from broker ID to partition IDs
|
|
HandleSessionCreated ( |
Called after the ZooKeeper session has expired and a new session has been created. We would have to re-create any ephemeral nodes here. |
|
HandleStateChanged ( |
Called when the ZooKeeper connection state has changed. Do nothing, since zkclient will do reconnect for us. |
|
ZKBrokerPartitionInfo ( IZooKeeperClient zkclient ) : System |
Initializes a new instance of the ZKBrokerPartitionInfo class.
|
|
ZKBrokerPartitionInfo ( Kafka.Client.Cfg.ProducerConfiguration config, Action |
Initializes a new instance of the ZKBrokerPartitionInfo class.
|
Метод | Описание | |
---|---|---|
BootstrapWithExistingBrokers ( string topic ) : SortedSet |
Add the all available brokers with default one partition for new topic, so all of the brokers participate in hosting this topic Since we do not have the in formation about number of partitions on these brokers, just assume single partition just pick partition 0 from each broker as a candidate |
|
EnsuresNotDisposed ( ) : void |
Ensures that object was not disposed
|
|
InitializeBrokers ( ) : void |
Initializes the list of brokers.
|
|
InitializeTopicBrokerPartitions ( ) : void |
Initializes the topic - broker's partitions mappings.
|
|
RegisterListeners ( ) : void |
Registers the listeners under several path in ZooKeeper to keep related data structures updated. Watch on following path: /broker/topics /broker/topics/[topic] /broker/ids |
|
Reset ( ) : void |
Resets the related data structures
|
public GetAllBrokerInfo ( ) : Broker>.IDictionary |
||
Результат | Broker>.IDictionary |
public GetBrokerInfo ( int brokerId ) : |
||
brokerId | int | The broker ID. |
Результат |
public GetBrokerPartitionInfo ( string topic ) : SortedSet |
||
topic | string | The topic for which this information is to be returned |
Результат | SortedSet |
public HandleSessionCreated ( |
||
args | The |
|
Результат | void |
public HandleStateChanged ( |
||
args | The |
|
Результат | void |
public ZKBrokerPartitionInfo ( IZooKeeperClient zkclient ) : System | ||
zkclient | IZooKeeperClient | The wrapper above ZooKeeper client. |
Результат | System |
public ZKBrokerPartitionInfo ( Kafka.Client.Cfg.ProducerConfiguration config, Action |
||
config | Kafka.Client.Cfg.ProducerConfiguration | The config. |
callback | Action |
The callback invoked when new broker is added. |
Результат | System |