You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/10 02:15:49 UTC

[GitHub] [kafka] hachikuji commented on a change in pull request #11603: MINOR: MetadataShell should handle ProducerIdsRecord

hachikuji commented on a change in pull request #11603:
URL: https://github.com/apache/kafka/pull/11603#discussion_r803244663



##########
File path: shell/src/main/java/org/apache/kafka/shell/MetadataNodeManager.java
##########
@@ -318,6 +320,15 @@ private void handleCommitImpl(MetadataRecordType type, ApiMessage message)
                     node.create(record.key()).setContents(record.value() + "");
                 break;
             }
+            case PRODUCER_IDS_RECORD: {
+                ProducerIdsRecord record = (ProducerIdsRecord) message;
+                DirectoryNode producerIdNode = data.root.mkdirs("producerIds");
+                producerIdNode.create("broker").setContents(record.brokerId() + "");

Review comment:
       Maybe `assignedBrokerId`? As in, this was the brokerId that the block was assigned to. Also, perhaps we may as well add `assignedBrokerEpoch` as well? I guess we could even do it like `/lastProducerBlock/assignedBroker/{id,epoch}`

##########
File path: shell/src/main/java/org/apache/kafka/shell/MetadataNodeManager.java
##########
@@ -318,6 +320,15 @@ private void handleCommitImpl(MetadataRecordType type, ApiMessage message)
                     node.create(record.key()).setContents(record.value() + "");
                 break;
             }
+            case PRODUCER_IDS_RECORD: {
+                ProducerIdsRecord record = (ProducerIdsRecord) message;
+                DirectoryNode producerIdNode = data.root.mkdirs("producerIds");

Review comment:
       How about `lastProducerIdBlock`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org