MINOR: Update the javadoc in GroupMetadataManager.scala
Reviewers: Guozhang Wang
@@ -1169,11 +1169,13 @@ object GroupMetadataManager {
/**
* Generates the key for offset commit message for given (group, topic, partition)
*
+ * @param groupId the ID of the group to generate the key
+ * @param topicPartition the TopicPartition to generate the key
* @return key for offset commit message
*/
- def offsetCommitKey(group: String, topicPartition: TopicPartition): Array[Byte] = {
+ def offsetCommitKey(groupId: String, topicPartition: TopicPartition): Array[Byte] = {
val key = new Struct(CURRENT_OFFSET_KEY_SCHEMA)
- key.set(OFFSET_KEY_GROUP_FIELD, group)
+ key.set(OFFSET_KEY_GROUP_FIELD, groupId)
key.set(OFFSET_KEY_TOPIC_FIELD, topicPartition.topic)
key.set(OFFSET_KEY_PARTITION_FIELD, topicPartition.partition)
@@ -1186,11 +1188,12 @@ object GroupMetadataManager {
/**
* Generates the key for group metadata message for given group
*
+ * @param groupId the ID of the group to generate the key
* @return key bytes for group metadata message
*/
- def groupMetadataKey(group: String): Array[Byte] = {
+ def groupMetadataKey(groupId: String): Array[Byte] = {
val key = new Struct(CURRENT_GROUP_KEY_SCHEMA)
- key.set(GROUP_KEY_GROUP_FIELD, group)
+ key.set(GROUP_KEY_GROUP_FIELD, groupId)
val byteBuffer = ByteBuffer.allocate(2 /* version */ + key.sizeOf)
byteBuffer.putShort(CURRENT_GROUP_KEY_SCHEMA_VERSION)
@@ -1314,7 +1317,7 @@ object GroupMetadataManager {
* Decodes the offset messages' key
*
* @param buffer input byte-buffer
- * @return an GroupTopicPartition object
+ * @return an OffsetKey or GroupMetadataKey object from the message
*/
def readMessageKey(buffer: ByteBuffer): BaseKey = {
val version = buffer.getShort
@@ -1392,6 +1395,7 @@ object GroupMetadataManager {
/**
* Decodes the group metadata messages' payload and retrieves its member metadata from it
*
+ * @param groupId The ID of the group to be read
* @param buffer input byte-buffer
* @param time the time instance to use
* @return a group metadata object from the message
