hachikuji commented on a change in pull request #11616:
URL: https://github.com/apache/kafka/pull/11616#discussion_r801162756



##########
File path: config/kraft/broker.properties
##########
@@ -31,22 +31,24 @@ controller.quorum.voters=1@localhost:9093
 
 ############################# Socket Server Settings 
#############################
 
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
+# The address the socket server listens on. If not configured, the host name 
will be equal to the value of
+# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, 
and port 9092.
 #   FORMAT:
 #     listeners = listener_name://host_name:port
 #   EXAMPLE:
 #     listeners = PLAINTEXT://your.host.name:9092
 listeners=PLAINTEXT://localhost:9092
+
+# Name of listener used for communication between brokers.
 inter.broker.listener.name=PLAINTEXT
 
-# Hostname and port the broker will advertise to producers and consumers. If 
not set,
-# it uses the value for "listeners" if configured.  Otherwise, it will use the 
value
-# returned from java.net.InetAddress.getCanonicalHostName().
+# Listener name, hostname and port the broker will advertise to producers and 
consumers.

Review comment:
       nit: I would just say "clients" since this also includes the Admin 
client.

##########
File path: config/kraft/README.md
##########
@@ -35,6 +35,9 @@ Formatting /tmp/kraft-combined-logs
 
 If you are using multiple nodes, then you should run the format command on 
each node.  Be sure to use the same cluster ID for each one.
 
+In this example, the `server.properties` file is a `broker,controller` 
combined node. If you want to separate `broker` and `controller` nodes,

Review comment:
       How about this?
   
   > This example configures the node as both a broker and controller (i.e. 
`process.roles=broker,controller`). It is also possible to run the broker and 
controller nodes separately. See 
[here](https://github.com/apache/kafka/blob/trunk/config/kraft/broker.properties)
 and 
[here](https://github.com/apache/kafka/blob/trunk/config/kraft/controller.properties)
 for example configurations.

##########
File path: config/kraft/broker.properties
##########
@@ -31,22 +31,24 @@ controller.quorum.voters=1@localhost:9093
 
 ############################# Socket Server Settings 
#############################
 
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
+# The address the socket server listens on. If not configured, the host name 
will be equal to the value of
+# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, 
and port 9092.
 #   FORMAT:
 #     listeners = listener_name://host_name:port
 #   EXAMPLE:
 #     listeners = PLAINTEXT://your.host.name:9092
 listeners=PLAINTEXT://localhost:9092
+
+# Name of listener used for communication between brokers.
 inter.broker.listener.name=PLAINTEXT
 
-# Hostname and port the broker will advertise to producers and consumers. If 
not set,
-# it uses the value for "listeners" if configured.  Otherwise, it will use the 
value
-# returned from java.net.InetAddress.getCanonicalHostName().
+# Listener name, hostname and port the broker will advertise to producers and 
consumers.
+# If not set, it uses the value for "listeners".
 advertised.listeners=PLAINTEXT://localhost:9092
 
-# Listener, host name, and port for the controller to advertise to the 
brokers. If
-# this server is a controller, this listener must be configured.
+# A comma-separated list of the names of the listeners used by the controller.
+# This is required if running in KRaft mode. On a node with 
`process.roles=broker`, any listeners beyond the first one is ignored.

Review comment:
       nit: instead of "any listeners beyond the first one is ignored," how 
about "only the first listed listener will be used by the broker"

##########
File path: config/kraft/broker.properties
##########
@@ -31,22 +31,24 @@ controller.quorum.voters=1@localhost:9093
 
 ############################# Socket Server Settings 
#############################
 
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
+# The address the socket server listens on. If not configured, the host name 
will be equal to the value of
+# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, 
and port 9092.
 #   FORMAT:
 #     listeners = listener_name://host_name:port
 #   EXAMPLE:
 #     listeners = PLAINTEXT://your.host.name:9092
 listeners=PLAINTEXT://localhost:9092
+
+# Name of listener used for communication between brokers.
 inter.broker.listener.name=PLAINTEXT
 
-# Hostname and port the broker will advertise to producers and consumers. If 
not set,
-# it uses the value for "listeners" if configured.  Otherwise, it will use the 
value
-# returned from java.net.InetAddress.getCanonicalHostName().
+# Listener name, hostname and port the broker will advertise to producers and 
consumers.
+# If not set, it uses the value for "listeners".
 advertised.listeners=PLAINTEXT://localhost:9092
 
-# Listener, host name, and port for the controller to advertise to the 
brokers. If
-# this server is a controller, this listener must be configured.
+# A comma-separated list of the names of the listeners used by the controller.
+# This is required if running in KRaft mode. On a node with 
`process.roles=broker`, any listeners beyond the first one is ignored.
+# That is, you should only set 1 listener name here for the "broker" role node.

Review comment:
       nit: this feels like overkill. 

##########
File path: config/producer.properties
##########
@@ -23,7 +23,7 @@ bootstrap.servers=localhost:9092
 # specify the compression codec for all data generated: none, gzip, snappy, 
lz4, zstd
 compression.type=none
 
-# name of the partitioner class for partitioning events; default partition 
spreads data randomly
+# name of the partitioner class for partitioning events; default partitioner 
will try sticking to a partition until the batch is full

Review comment:
       Do we use "events" consistently? Seems like "records" would be more in 
keeping with the APIs. 
   
   > The default uses "sticky" partitioning logic, which attempts to fill 
batches in order to improve throughput.
   
   

##########
File path: config/kraft/server.properties
##########
@@ -31,22 +31,23 @@ controller.quorum.voters=1@localhost:9093
 
 ############################# Socket Server Settings 
#############################
 
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
+# The address the socket server listens on. If not configured, the host name 
will be equal to the value of
+# java.net.InetAddress.getCanonicalHostName(), with PLAINTEXT listener name, 
and port 9092.
 #   FORMAT:
 #     listeners = listener_name://host_name:port
 #   EXAMPLE:
 #     listeners = PLAINTEXT://your.host.name:9092
 listeners=PLAINTEXT://:9092,CONTROLLER://:9093
+
+# Name of listener used for communication between brokers.
 inter.broker.listener.name=PLAINTEXT
 
-# Hostname and port the broker will advertise to producers and consumers. If 
not set,
-# it uses the value for "listeners" if configured.  Otherwise, it will use the 
value
-# returned from java.net.InetAddress.getCanonicalHostName().
+# Listener name, hostname and port the broker will advertise to producers and 
consumers.
+# If not set, it uses the value for "listeners".
 advertised.listeners=PLAINTEXT://localhost:9092
 
-# Listener, host name, and port for the controller to advertise to the 
brokers. If
-# this server is a controller, this listener must be configured.
+# A comma-separated list of the names of the listeners used by the controller.
+# This is required if running in KRaft mode.

Review comment:
       It might be worth pointing out how that the controller listener is 
assumed to be PLAINTEXT as long as all other listeners are configured for 
PLAINTEXT as well.

##########
File path: config/kraft/server.properties
##########
@@ -31,22 +31,23 @@ controller.quorum.voters=1@localhost:9093
 
 ############################# Socket Server Settings 
#############################
 
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
+# The address the socket server listens on. If not configured, the host name 
will be equal to the value of

Review comment:
       Is this still accurate when process.roles=broker,controller?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to