kafka.log

LogManager

class LogManager extends Logging

The entry point to the kafka log management subsystem. The log manager is responsible for log creation, retrieval, and cleaning. All read and write operations are delegated to the individual log instances.

The log manager maintains logs in one or more directories. New logs are created in the data directory with the fewest logs. No attempt is made to move partitions after the fact or balance based on size or I/O rate.

A background thread handles log retention by periodically truncating excess log segments.

Annotations
@threadsafe()
Linear Supertypes
Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. LogManager
  2. Logging
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LogManager(logDirs: Array[File], topicConfigs: Map[String, LogConfig], defaultConfig: LogConfig, cleanerConfig: CleanerConfig, ioThreads: Int, flushCheckMs: Long, flushCheckpointMs: Long, retentionCheckMs: Long, scheduler: Scheduler, brokerState: BrokerState, time: Time)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val InitialTaskDelayMs: Int

  7. val LockFile: String

  8. val RecoveryPointCheckpointFile: String

  9. def allLogs(): Iterable[Log]

    Get all the partition logs

  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val brokerState: BrokerState

  12. def checkpointRecoveryPointOffsets(): Unit

    Write out the current recovery point for all logs to a text file in the log directory to avoid recovering the whole log on startup.

  13. val cleanerConfig: CleanerConfig

  14. def cleanupLogs(): Unit

    Delete any eligible logs.

    Delete any eligible logs. Return the number of segments deleted.

  15. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def createLog(topicAndPartition: TopicAndPartition, config: LogConfig): Log

    Create a log for the given topic and the given partition If the log already exists, just return a copy of the existing log

  17. def debug(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  18. def debug(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  19. def debug(msg: ⇒ String): Unit

    Definition Classes
    Logging
  20. val defaultConfig: LogConfig

  21. def deleteLog(topicAndPartition: TopicAndPartition): Unit

    Delete a log.

  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def error(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  25. def error(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  26. def error(msg: ⇒ String): Unit

    Definition Classes
    Logging
  27. def fatal(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  28. def fatal(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  29. def fatal(msg: ⇒ String): Unit

    Definition Classes
    Logging
  30. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. val flushCheckMs: Long

  32. val flushCheckpointMs: Long

  33. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  34. def getLog(topicAndPartition: TopicAndPartition): Option[Log]

    Get the log if it exists, otherwise return None

  35. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  36. def info(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  37. def info(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  38. def info(msg: ⇒ String): Unit

    Definition Classes
    Logging
  39. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  40. val logDirs: Array[File]

  41. var logIdent: String

    Attributes
    protected
    Definition Classes
    Logging
  42. lazy val logger: Logger

    Definition Classes
    Logging
  43. val loggerName: String

    Definition Classes
    Logging
  44. def logsByTopicPartition: Map[TopicAndPartition, Log]

    Get a map of TopicAndPartition => Log

  45. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  46. final def notify(): Unit

    Definition Classes
    AnyRef
  47. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  48. val retentionCheckMs: Long

  49. def shutdown(): Unit

    Close all the logs

  50. def startup(): Unit

    Start the background threads to flush logs and do log cleanup

  51. def swallow(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  52. def swallowDebug(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  53. def swallowError(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  54. def swallowInfo(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  55. def swallowTrace(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  56. def swallowWarn(action: ⇒ Unit): Unit

    Definition Classes
    Logging
  57. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. val topicConfigs: Map[String, LogConfig]

  60. def trace(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  61. def trace(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  62. def trace(msg: ⇒ String): Unit

    Definition Classes
    Logging
  63. def truncateFullyAndStartAt(topicAndPartition: TopicAndPartition, newOffset: Long): Unit

    Delete all data in a partition and start the log at the new offset

    Delete all data in a partition and start the log at the new offset

    newOffset

    The new offset to start the log with

  64. def truncateTo(partitionAndOffsets: Map[TopicAndPartition, Long]): Unit

    Truncate the partition logs to the specified offsets and checkpoint the recovery point to this offset

    Truncate the partition logs to the specified offsets and checkpoint the recovery point to this offset

    partitionAndOffsets

    Partition logs that need to be truncated

  65. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  66. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  67. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  68. def warn(msg: ⇒ String, e: ⇒ Throwable): Unit

    Definition Classes
    Logging
  69. def warn(e: ⇒ Throwable): Any

    Definition Classes
    Logging
  70. def warn(msg: ⇒ String): Unit

    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any