Skip to content

Commit a5e3bfa

Browse files
authored
KAFKA-19527 improve the docs of LogDirDescription for remote storage (#20211)
Clarifies that the fields `LogDirDescription#totalBytes`, `LogDirDescription#usableBytes`, and `ReplicaInfo#size` do not include the size of remote storage by updating their corresponding docs. Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
1 parent 6973dea commit a5e3bfa

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

clients/src/main/java/org/apache/kafka/clients/admin/LogDirDescription.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public Map<TopicPartition, ReplicaInfo> replicaInfos() {
6767
/**
6868
* The total size of the volume this log directory is on or empty if the broker did not return a value.
6969
* For volumes larger than Long.MAX_VALUE, Long.MAX_VALUE is returned.
70+
* This value does not include the size of data stored in remote storage.
7071
*/
7172
public OptionalLong totalBytes() {
7273
return totalBytes;
@@ -75,6 +76,7 @@ public OptionalLong totalBytes() {
7576
/**
7677
* The usable size on the volume this log directory is on or empty if the broker did not return a value.
7778
* For usable sizes larger than Long.MAX_VALUE, Long.MAX_VALUE is returned.
79+
* This value does not include the size of data stored in remote storage.
7880
*/
7981
public OptionalLong usableBytes() {
8082
return usableBytes;

clients/src/main/java/org/apache/kafka/clients/admin/ReplicaInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public ReplicaInfo(long size, long offsetLag, boolean isFuture) {
3333

3434
/**
3535
* The total size of the log segments in this replica in bytes.
36+
* This value does not include the size of data stored in remote storage.
3637
*/
3738
public long size() {
3839
return size;

clients/src/main/resources/common/message/DescribeLogDirsResponse.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
"about": "True if this log is created by AlterReplicaLogDirsRequest and will replace the current log of the replica in the future." }]}
5252
]},
5353
{ "name": "TotalBytes", "type": "int64", "versions": "4+", "ignorable": true, "default": "-1",
54-
"about": "The total size in bytes of the volume the log directory is in."
54+
"about": "The total size in bytes of the volume the log directory is in. This value does not include the size of data stored in remote storage."
5555
},
5656
{ "name": "UsableBytes", "type": "int64", "versions": "4+", "ignorable": true, "default": "-1",
57-
"about": "The usable size in bytes of the volume the log directory is in."
57+
"about": "The usable size in bytes of the volume the log directory is in. This value does not include the size of data stored in remote storage."
5858
}
5959
]}
6060
]
61-
}
61+
}

0 commit comments

Comments
 (0)