class AdminUtils extends Logging
Borrowed from kafka 0.8.1.1, adapted to use curator framework https://git-wip-us.apache.org/repos/asf?p=kafka.git;a=blob;f=core/src/main/scala/kafka/admin/AdminUtils.scala
- Alphabetic
- By Inheritance
- AdminUtils
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AdminUtils(version: KafkaVersion)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val TopicConfigChangeZnodePrefix: String
-
def
addPartitions(curator: CuratorFramework, topic: String, newNumPartitions: Int, partitionReplicaList: Map[Int, Seq[Int]], brokerList: Set[Int], readVersion: Int): Unit
Add partitions to existing topic with optional replica assignment
Add partitions to existing topic with optional replica assignment
- curator
Zookeeper client
- topic
topic for adding partitions to
- newNumPartitions
Number of partitions to be set
- partitionReplicaList
current partition to replic set mapping
- brokerList
broker list
- def addPartitionsToTopics(curator: CuratorFramework, topicAndReplicaList: Seq[(String, Map[Int, Seq[Int]])], newNumPartitions: Int, brokerList: Set[Int], readVersions: Map[String, Int]): Unit
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
assignReplicasToBrokers(brokerListSet: Set[Int], nPartitions: Int, replicationFactor: Int, fixedStartIndex: Int = -1, startPartitionId: Int = -1): Map[Int, Seq[Int]]
There are 2 goals of replica assignment: 1.
There are 2 goals of replica assignment: 1. Spread the replicas evenly among brokers. 2. For partitions assigned to a particular broker, their other replicas are spread over the other brokers.
To achieve this goal, we: 1. Assign the first replica of each partition by round-robin, starting from a random position in the broker list. 2. Assign the remaining replicas of each partition with an increasing shift.
Here is an example of assigning broker-0 broker-1 broker-2 broker-3 broker-4 p0 p1 p2 p3 p4 (1st replica) p5 p6 p7 p8 p9 (1st replica) p4 p0 p1 p2 p3 (2nd replica) p8 p9 p5 p6 p7 (2nd replica) p3 p4 p0 p1 p2 (3nd replica) p7 p8 p9 p5 p6 (3nd replica)
-
def
changeTopicConfig(curator: CuratorFramework, topic: String, config: Properties, readVersion: Int): Unit
Update the config for an existing topic and create a change notification so the change will propagate to other brokers
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def createOrUpdateTopicPartitionAssignmentPathInZK(curator: CuratorFramework, topic: String, partitionReplicaAssignment: Map[Int, Seq[Int]], config: Properties = new Properties, update: Boolean = false, readVersion: Int = -1): Unit
- def createTopic(curator: CuratorFramework, brokers: Set[Int], topic: String, partitions: Int, replicationFactor: Int, topicConfig: Properties = new Properties): Unit
-
def
debug(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
debug(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def deleteTopic(curator: CuratorFramework, topic: String): Unit
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
error(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
info(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
info(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
isWarnEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val rand: Random
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def topicExists(curator: CuratorFramework, topic: String): Boolean
-
def
trace(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
trace(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
warn(mkr: Marker, msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any, t: ⇒ Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
warn(msg: ⇒ Any): Unit
- Attributes
- protected
- Definition Classes
- Logging