Class

kafka.log

LogManager

Related Doc: package log

Permalink

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
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)

    Permalink

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. val InitialTaskDelayMs: Int

    Permalink
  5. val LockFile: String

    Permalink
  6. val RecoveryPointCheckpointFile: String

    Permalink
  7. def allLogs(): Iterable[Log]

    Permalink

    Get all the partition logs

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. val brokerState: BrokerState

    Permalink
  10. def checkpointRecoveryPointOffsets(): Unit

    Permalink

    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 cleaner: LogCleaner

    Permalink
  12. val cleanerConfig: CleanerConfig

    Permalink
  13. def cleanupLogs(): Unit

    Permalink

    Delete any eligible logs.

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

  14. def clone(): AnyRef

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

    Permalink

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

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

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

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

    Permalink
    Definition Classes
    Logging
  19. val defaultConfig: LogConfig

    Permalink
  20. def deleteLog(topicAndPartition: TopicAndPartition): Unit

    Permalink

    Delete a log.

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    Logging
  29. def finalize(): Unit

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

    Permalink
  31. val flushCheckpointMs: Long

    Permalink
  32. final def getClass(): Class[_]

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

    Permalink

    Get the log if it exists, otherwise return None

  34. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    Any
  39. val logDirs: Array[File]

    Permalink
  40. var logIdent: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  41. lazy val logger: Logger

    Permalink
    Definition Classes
    Logging
  42. val loggerName: String

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

    Permalink

    Get a map of TopicAndPartition => Log

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

    Permalink
    Definition Classes
    AnyRef
  45. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. val retentionCheckMs: Long

    Permalink
  48. def shutdown(): Unit

    Permalink

    Close all the logs

  49. def startup(): Unit

    Permalink

    Start the background threads to flush logs and do log cleanup

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  57. def toString(): String

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

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

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

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

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

    Permalink

    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

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

    Permalink

    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

  64. final def wait(): Unit

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

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

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

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

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

    Permalink
    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped