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. LogManager
  2. Logging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
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: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. val InitialTaskDelayMs: Int

  5. val LockFile: String

  6. val RecoveryPointCheckpointFile: String

  7. def allLogs(): Iterable[Log]

    Get all the partition logs

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val brokerState: BrokerState

  10. 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.

  11. val cleanerConfig: CleanerConfig

  12. def cleanupLogs(): Unit

    Delete any eligible logs.

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

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. 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

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

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

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

    Definition Classes
    Logging
  18. val defaultConfig: LogConfig

  19. def deleteLog(topicAndPartition: TopicAndPartition): Unit

    Delete a log.

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

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

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

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

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

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

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

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

    Definition Classes
    Logging
  28. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. val flushCheckMs: Long

  30. val flushCheckpointMs: Long

  31. final def getClass(): Class[_]

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

    Get the log if it exists, otherwise return None

  33. def hashCode(): Int

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

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

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

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

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

  39. var logIdent: String

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

    Definition Classes
    Logging
  41. val loggerName: String

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

    Get a map of TopicAndPartition => Log

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

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

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

    Definition Classes
    AnyRef
  46. val retentionCheckMs: Long

  47. def shutdown(): Unit

    Close all the logs

  48. def startup(): Unit

    Start the background threads to flush logs and do log cleanup

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  56. def toString(): String

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

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

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

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

    Definition Classes
    Logging
  61. 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

  62. 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

  63. final def wait(): Unit

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

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

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

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

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

    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped