[ 
https://issues.apache.org/jira/browse/KAFKA-8633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Weichu Liu updated KAFKA-8633:
------------------------------
    Description: 
The auto generated tables for all configurations (e.g. 
https://kafka.apache.org/documentation/#brokerconfigs) are with 2 </td> for 
each cell.

e.g. the first row for broker configuration.

{noformat}
<tr>
<td>zookeeper.connect</td></td><td>Specifies the ZooKeeper connection string in 
the form <code>hostname:port</code> where host and port are the host and port 
of a ZooKeeper server. To allow connecting through other ZooKeeper nodes when 
that ZooKeeper machine is down you can also specify multiple hosts in the form 
<code>hostname1:port1,hostname2:port2,hostname3:port3</code>.
The server can also have a ZooKeeper chroot path as part of its ZooKeeper 
connection string which puts its data under some path in the global ZooKeeper 
namespace. For example to give a chroot path of <code>/chroot/path</code> you 
would give the connection string as 
<code>hostname1:port1,hostname2:port2,hostname3:port3/chroot/path</code>.</td></td><td>string</td></td><td></td></td><td></td></td><td>high</td></td><td>read-only</td></tr>
{noformat}

This is due to {{toHtmlTable}} function in 
{{./clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java}} is 
appending an extra "</td>" in the code.

{code:java}
            for (String headerName : headers()) {
                addColumnValue(b, getConfigValue(key, headerName));
                b.append("</td>");
            }
{code}

(The addColumnValue already wrap the value with <td> and </td>)

This is very minor issue, but it will prevent an html parser to properly fetch 
table data (like what I was trying to do)

--------------

Update: I also found another glitch in the doc:

Some configuration are using '<>' in the string, but they are recognized as 
html tags so the description is not properly displayed.
For example, the {{client.id}} of [Kafka Streams 
Configs|https://kafka.apache.org/documentation/#streamsconfigs] displays

> An ID prefix string used for the client IDs of internal consumer, producer 
> and restore-consumer, with pattern '-StreamThread--'.

However it should be

> with pattern 
> '<client.id>-StreamThread-<threadSequenceNumber>-<consumer|producer|restore-consumer>'.

I feel the fastest way is to avoid angle brackets at all.


  was:
The auto generated tables for all configurations (e.g. 
https://kafka.apache.org/documentation/#brokerconfigs) are with 2 </td> for 
each cell.

e.g. the first row for broker configuration.

{noformat}
<tr>
<td>zookeeper.connect</td></td><td>Specifies the ZooKeeper connection string in 
the form <code>hostname:port</code> where host and port are the host and port 
of a ZooKeeper server. To allow connecting through other ZooKeeper nodes when 
that ZooKeeper machine is down you can also specify multiple hosts in the form 
<code>hostname1:port1,hostname2:port2,hostname3:port3</code>.
The server can also have a ZooKeeper chroot path as part of its ZooKeeper 
connection string which puts its data under some path in the global ZooKeeper 
namespace. For example to give a chroot path of <code>/chroot/path</code> you 
would give the connection string as 
<code>hostname1:port1,hostname2:port2,hostname3:port3/chroot/path</code>.</td></td><td>string</td></td><td></td></td><td></td></td><td>high</td></td><td>read-only</td></tr>
{noformat}

This is due to {{toHtmlTable}} function in 
{{./clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java}} is 
appending an extra "</td>" in the code.

{code:java}
            for (String headerName : headers()) {
                addColumnValue(b, getConfigValue(key, headerName));
                b.append("</td>");
            }
{code}

(The addColumnValue already wrap the value with <td> and </td>)

This is very minor issue, but it will prevent an html parser to properly fetch 
table data (like what I was trying to do)


> Extra </td> in generated documents
> ----------------------------------
>
>                 Key: KAFKA-8633
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8633
>             Project: Kafka
>          Issue Type: Task
>          Components: documentation
>            Reporter: Weichu Liu
>            Priority: Trivial
>
> The auto generated tables for all configurations (e.g. 
> https://kafka.apache.org/documentation/#brokerconfigs) are with 2 </td> for 
> each cell.
> e.g. the first row for broker configuration.
> {noformat}
> <tr>
> <td>zookeeper.connect</td></td><td>Specifies the ZooKeeper connection string 
> in the form <code>hostname:port</code> where host and port are the host and 
> port of a ZooKeeper server. To allow connecting through other ZooKeeper nodes 
> when that ZooKeeper machine is down you can also specify multiple hosts in 
> the form <code>hostname1:port1,hostname2:port2,hostname3:port3</code>.
> The server can also have a ZooKeeper chroot path as part of its ZooKeeper 
> connection string which puts its data under some path in the global ZooKeeper 
> namespace. For example to give a chroot path of <code>/chroot/path</code> you 
> would give the connection string as 
> <code>hostname1:port1,hostname2:port2,hostname3:port3/chroot/path</code>.</td></td><td>string</td></td><td></td></td><td></td></td><td>high</td></td><td>read-only</td></tr>
> {noformat}
> This is due to {{toHtmlTable}} function in 
> {{./clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java}} is 
> appending an extra "</td>" in the code.
> {code:java}
>             for (String headerName : headers()) {
>                 addColumnValue(b, getConfigValue(key, headerName));
>                 b.append("</td>");
>             }
> {code}
> (The addColumnValue already wrap the value with <td> and </td>)
> This is very minor issue, but it will prevent an html parser to properly 
> fetch table data (like what I was trying to do)
> --------------
> Update: I also found another glitch in the doc:
> Some configuration are using '<>' in the string, but they are recognized as 
> html tags so the description is not properly displayed.
> For example, the {{client.id}} of [Kafka Streams 
> Configs|https://kafka.apache.org/documentation/#streamsconfigs] displays
> > An ID prefix string used for the client IDs of internal consumer, producer 
> > and restore-consumer, with pattern '-StreamThread--'.
> However it should be
> > with pattern 
> > '<client.id>-StreamThread-<threadSequenceNumber>-<consumer|producer|restore-consumer>'.
> I feel the fastest way is to avoid angle brackets at all.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to