Class LogDirDescription

java.lang.Object
org.apache.kafka.clients.admin.LogDirDescription

public class LogDirDescription extends Object
A description of a log directory on a particular broker.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LogDirDescription(org.apache.kafka.common.errors.ApiException error, Map<org.apache.kafka.common.TopicPartition,ReplicaInfo> replicaInfos)
     
    LogDirDescription(org.apache.kafka.common.errors.ApiException error, Map<org.apache.kafka.common.TopicPartition,ReplicaInfo> replicaInfos, long totalBytes, long usableBytes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.kafka.common.errors.ApiException
    Returns `ApiException` if the log directory is offline or an error occurred, otherwise returns null.
    Map<org.apache.kafka.common.TopicPartition,ReplicaInfo>
    A map from topic partition to replica information for that partition in this log directory.
     
    The total size of the volume this log directory is on or empty if the broker did not return a value.
    The usable size on the volume this log directory is on or empty if the broker did not return a value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LogDirDescription

      public LogDirDescription(org.apache.kafka.common.errors.ApiException error, Map<org.apache.kafka.common.TopicPartition,ReplicaInfo> replicaInfos)
    • LogDirDescription

      public LogDirDescription(org.apache.kafka.common.errors.ApiException error, Map<org.apache.kafka.common.TopicPartition,ReplicaInfo> replicaInfos, long totalBytes, long usableBytes)
  • Method Details

    • error

      public org.apache.kafka.common.errors.ApiException error()
      Returns `ApiException` if the log directory is offline or an error occurred, otherwise returns null.
      • KafkaStorageException - The log directory is offline.
      • UnknownServerException - The server experienced an unexpected error when processing the request.
    • replicaInfos

      public Map<org.apache.kafka.common.TopicPartition,ReplicaInfo> replicaInfos()
      A map from topic partition to replica information for that partition in this log directory.
    • totalBytes

      public OptionalLong totalBytes()
      The total size of the volume this log directory is on or empty if the broker did not return a value. For volumes larger than Long.MAX_VALUE, Long.MAX_VALUE is returned.
    • usableBytes

      public OptionalLong usableBytes()
      The usable size on the volume this log directory is on or empty if the broker did not return a value. For usable sizes larger than Long.MAX_VALUE, Long.MAX_VALUE is returned.
    • toString

      public String toString()
      Overrides:
      toString in class Object