Skip to content

Commit

Permalink
MINOR: Fix DefaultRecordBatch and DefaultRecord protocol documentation (
Browse files Browse the repository at this point in the history
#17196)

Reviewers: Chia-Ping Tsai <[email protected]>
  • Loading branch information
Veryfirefly authored Sep 30, 2024
1 parent 9cb4909 commit 6ee46ea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@
* Attributes => Int8
* TimestampDelta => Varlong
* OffsetDelta => Varint
* KeyLength => Varint
* Key => Bytes
* ValueLength => Varint
* Value => Bytes
* HeadersCount => Varint
* Headers => [HeaderKey HeaderValue]
* HeaderKeyLength => Varint
* HeaderKey => String
* HeaderValueLength => Varint
* HeaderValue => Bytes
*
* Note that in this schema, the Bytes and String types use a variable length integer to represent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
* ProducerId => Int64
* ProducerEpoch => Int16
* BaseSequence => Int32
* RecordsCount => Int32
* Records => [Record]
*
* Note that when compression is enabled (see attributes below), the compressed record data is serialized
Expand Down
4 changes: 3 additions & 1 deletion docs/implementation.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ <h4 class="anchor-heading"><a id="recordbatch" class="anchor-link"></a><a href="
producerId: int64
producerEpoch: int16
baseSequence: int32
recordsCount: int32
records: [Record]</code></pre>
<p> Note that when compression is enabled, the compressed record data is serialized directly following the count of the number of records. </p>

Expand Down Expand Up @@ -88,8 +89,9 @@ <h4 class="anchor-heading"><a id="record" class="anchor-link"></a><a href="#reco
offsetDelta: varint
keyLength: varint
key: byte[]
valueLen: varint
valueLength: varint
value: byte[]
headersCount: varint
Headers => [Header]</code></pre>
<h5 class="anchor-heading"><a id="recordheader" class="anchor-link"></a><a href="#recordheader">5.3.2.1 Record Header</a></h5>
<pre><code class="language-text">headerKeyLength: varint
Expand Down

0 comments on commit 6ee46ea

Please sign in to comment.