Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No changes in the Request. Two new fields are added to the Response: TotalSpace TotalBytes and UsableSpaceUsableBytes

Code Block
languagejs
{
  "apiKey": 35,
  "type": "response",
  "name": "DescribeLogDirsResponse",
  // Starting in version 1, on quota violation, brokers send out responses before throttling.
  "validVersions": "0-4",
  // Version 2 is the first flexible version.
  // Version 3 adds the top-level ErrorCode field
  // Version 4 adds the TotalSpace and UsableSpace fields
  "flexibleVersions": "2+",
  "fields": [
    { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
      "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
    { "name": "ErrorCode", "type": "int16", "versions": "3+", "about": "The error code, or 0 if there was no error." },
    { "name": "Results", "type": "[]DescribeLogDirsResult", "versions": "0+",
      "about": "The log directories.", "fields": [
      { "name": "ErrorCode", "type": "int16", "versions": "0+",
        "about": "The error code, or 0 if there was no error." },
      { "name": "LogDir", "type": "string", "versions": "0+",
        "about": "The absolute log directory path." },
      { "name": "Topics", "type": "[]DescribeLogDirsTopic", "versions": "0+",
        "about": "Each topic.", "fields": [
          ...
        ]}
      ]},
      { "name": "TotalSpaceBytesTotalBytes", "type": "int64", "versions": "4+", "ignorable": true, "default": "-1",
        "about": "The total size in bytes of the log directory."
      },
      { "name": "UsableSpaceBytesUsableBytes", "type": "int64", "versions": "4+", "ignorable": true, "default": "-1",
        "about": "The usable size in bytes of the log directory."
      }
    ]}
  ]
}

...

Code Block
languagejava
/**
 * Returns the total size of the log directory in bytes. The optional will be empty if the broker does not support this feature or if an error happened accessing the log directory (see the error field).
 */
public OptionalLong totalSpaceBytestotalBytes()

/**
 * Returns the currently usable size of the log directory in bytes. The optional will be empty if the broker does not support this feature or if an error happened accessing the log directory (see the error field).
 */ 
public OptionalLong usableSpaceBytesusableBytes()

Compatibility, Deprecation, and Migration Plan

...