kafka.cluster

Partition

class Partition extends Logging with KafkaMetricsGroup

Data structure that represents a topic partition. The leader maintains the AR, ISR, CUR, RAR

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Partition
  2. KafkaMetricsGroup
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Partition(topic: String, partitionId: Int, replicationFactor: Int, time: Time, replicaManager: ReplicaManager)

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. def addReplicaIfNotExists(replica: Replica): Replica

  7. def appendMessagesToLeader(messages: ByteBufferMessageSet): (Long, Long)

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def assignedReplicas(): Set[Replica]

  10. def checkEnoughReplicasReachOffset(requiredOffset: Long, requiredAcks: Int): (Boolean, Short)

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def debug(msg: ⇒ String, e: ⇒ Throwable): Unit

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

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

    Definition Classes
    Logging
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(that: Any): Boolean

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

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

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

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

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

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

    Definition Classes
    Logging
  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def getOrCreateReplica(replicaId: Int = localBrokerId): Replica

  26. def getOutOfSyncReplicas(leaderReplica: Replica, keepInSyncTimeMs: Long, keepInSyncMessages: Long): Set[Replica]

  27. def getReplica(replicaId: Int = localBrokerId): Option[Replica]

  28. def hashCode(): Int

    Definition Classes
    Partition → AnyRef → Any
  29. var inSyncReplicas: Set[Replica]

  30. def info(msg: ⇒ String, e: ⇒ Throwable): Unit

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

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

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

    Definition Classes
    Any
  34. def isUnderReplicated(): Boolean

  35. var leaderReplicaIdOpt: Option[Int]

  36. def leaderReplicaIfLocal(): Option[Replica]

  37. var logIdent: String

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

    Definition Classes
    Logging
  39. val loggerName: String

    Definition Classes
    Logging
  40. def makeFollower(controllerId: Int, topic: String, partitionId: Int, leaderIsrAndControllerEpoch: LeaderIsrAndControllerEpoch, leaders: Set[Broker], correlationId: Int): Boolean

    If the leaderEpoch of the incoming request is higher than locally cached epoch, make the local replica the follower in the following steps.

    If the leaderEpoch of the incoming request is higher than locally cached epoch, make the local replica the follower in the following steps.

    1. stop any existing fetcher on this partition from the local replica 2. make sure local replica exists and truncate the log to high watermark 3. set the leader and set ISR to empty 4. start a fetcher to the new leader
  41. def makeLeader(controllerId: Int, topic: String, partitionId: Int, leaderIsrAndControllerEpoch: LeaderIsrAndControllerEpoch, correlationId: Int): Boolean

    If the leaderEpoch of the incoming request is higher than locally cached epoch, make the local replica the leader in the following steps.

    If the leaderEpoch of the incoming request is higher than locally cached epoch, make the local replica the leader in the following steps.

    1. stop the existing replica fetcher 2. create replicas in ISR if needed (the ISR expand/shrink logic needs replicas in ISR to be available) 3. reset LogEndOffset for remote replicas (there could be old LogEndOffset from the time when this broker was the leader last time) 4. set the new leader and ISR
  42. def maybeShrinkIsr(replicaMaxLagTimeMs: Long, replicaMaxLagMessages: Long): Unit

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

    Definition Classes
    AnyRef
  44. def newGauge[T](name: String, metric: Gauge[T]): Gauge[T]

    Definition Classes
    KafkaMetricsGroup
  45. def newHistogram(name: String, biased: Boolean = true): Histogram

    Definition Classes
    KafkaMetricsGroup
  46. def newMeter(name: String, eventType: String, timeUnit: TimeUnit): Meter

    Definition Classes
    KafkaMetricsGroup
  47. def newTimer(name: String, durationUnit: TimeUnit, rateUnit: TimeUnit): Timer

    Definition Classes
    KafkaMetricsGroup
  48. final def notify(): Unit

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

    Definition Classes
    AnyRef
  50. val partitionId: Int

  51. val replicaManager: ReplicaManager

  52. var replicationFactor: Int

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  60. def toString(): String

    Definition Classes
    Partition → AnyRef → Any
  61. val topic: String

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

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

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

    Definition Classes
    Logging
  65. def updateLeaderHWAndMaybeExpandIsr(replicaId: Int, offset: Long): Unit

  66. final def wait(): Unit

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

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

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

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

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

    Definition Classes
    Logging

Inherited from KafkaMetricsGroup

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped