kafka.log

LogManager

Related Doc: package log

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

  12. val cleanerConfig: CleanerConfig

  13. def cleanupLogs(): Unit

    Delete any eligible logs.

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

  14. def clone(): AnyRef

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

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

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

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

    Definition Classes
    Logging
  19. val defaultConfig: LogConfig

  20. def deleteLog(topicAndPartition: TopicAndPartition): Unit

    Delete a log.

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

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

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

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

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

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

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

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

    Definition Classes
    Logging
  29. def finalize(): Unit

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

  31. val flushCheckpointMs: Long

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

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

    Get the log if it exists, otherwise return None

  34. def hashCode(): Int

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

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

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

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

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

  40. var logIdent: String

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

    Definition Classes
    Logging
  42. val loggerName: String

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

    Get a map of TopicAndPartition => Log

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

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

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

    Definition Classes
    AnyRef
  47. val retentionCheckMs: Long

  48. def shutdown(): Unit

    Close all the logs

  49. def startup(): Unit

    Start the background threads to flush logs and do log cleanup

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  57. def toString(): String

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

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

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

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

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

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

  64. final def wait(): Unit

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

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

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

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

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

    Definition Classes
    Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped