Database Reference
In-Depth Information
WARN Either no config or no quorum defined
in config, running in standalone mode
(org.apache.zookeeper.server.quorum.QuorumPeerMain)
INFO Reading configuration from:
config/zookeeper.properties
(org.apache.zookeeper.server.quorum.QuorumPeerConfig)
INFO Starting server
(org.apache.zookeeper.server.ZooKeeperServerMain)
[ Other Output Omitted ]
After ZooKeeper has been started, all that remains is to configure and start
the Kafka brokers.
Configuring the Broker
The Broker is the name of the Kafka server. Like ZooKeeper, it is configured
withasimplepropertiesfilethatdefinesthebrokeritself.Information about
the topics and offset data is kept either with the data itself or in the
ZooKeeper cluster. This section walks through this properties file and
explains each of the settings and their effect on the cluster.
After some boilerplate containing the appropriate Apache licensing
information, the first setting is the broker identifier. Unlike ZooKeeper,
where the id is limited to 0-255, Kafka represents the broker as a unique
unsigned 32-bit integer (internally, this is an encoded as a Java long value,
but the value must be positive, which limits the effective range to 32 bits):
# The id of the broker. This must be set to a unique
integer
# for each broker.
broker.id=0
If you're using IPv4 addressing, an option for assigning unique broker ids
is to use the IPv4 address converted to an unsigned 32-bit number. Many
programming languages have a function called inet_aton that is used
to convert a “dotted quad” IP address to an unsigned 32-bit integer, but
this can also be calculated from the Linux Bash shell using the following
one-liner, assuming that the bc utility is installed:
Search WWH ::




Custom Search