kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Use API hyperlinks in 'Kafka Protocol Guide' to facilitate navigation
Date Sun, 26 Feb 2017 02:45:08 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 5b22b53f0 -> 5b682baad


MINOR: Use API hyperlinks in 'Kafka Protocol Guide' to facilitate navigation

Finding the protocol associated with an API key can be a challenge in the lengthy [web page](http://kafka.apache.org/protocol.html#protocol_api_keys).
Adding hyperlinks would definitely help with that.

Co-authored with imandhan.

Author: Vahid Hashemian <vahidhashemian@us.ibm.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #2467 from vahidhashemian/minor/hyperlinks_in_kafka_protocol_guide


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/5b682baa
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/5b682baa
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/5b682baa

Branch: refs/heads/trunk
Commit: 5b682baad546e41fe7aa27be0865ea6adaca2d2a
Parents: 5b22b53
Author: Vahid Hashemian <vahidhashemian@us.ibm.com>
Authored: Sat Feb 25 18:44:32 2017 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Sat Feb 25 18:44:32 2017 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/kafka/common/protocol/ApiKeys.java   | 2 +-
 .../src/main/java/org/apache/kafka/common/protocol/Protocol.java  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/5b682baa/clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java b/clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java
index 50d89f1..4e525df 100644
--- a/clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java
+++ b/clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java
@@ -136,7 +136,7 @@ public enum ApiKeys {
         for (ApiKeys key : ApiKeys.values()) {
             b.append("<tr>\n");
             b.append("<td>");
-            b.append(key.name);
+            b.append("<a href=\"#The_Messages_" + key.name + "\">" + key.name + "</a>");
             b.append("</td>");
             b.append("<td>");
             b.append(key.id);

http://git-wip-us.apache.org/repos/asf/kafka/blob/5b682baa/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
index b04587f..032e00e 100644
--- a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
+++ b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
@@ -1176,10 +1176,11 @@ public class Protocol {
         for (ApiKeys key : ApiKeys.values()) {
             // Key
             b.append("<h5>");
+            b.append("<a name=\"The_Messages_" + key.name + "\">");
             b.append(key.name);
             b.append(" API (Key: ");
             b.append(key.id);
-            b.append("):</h5>\n\n");
+            b.append("):</a></h5>\n\n");
             // Requests
             b.append("<b>Requests:</b><br>\n");
             Schema[] requests = REQUESTS[key.id];


Mime
View raw message