You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "divijvaidya (via GitHub)" <gi...@apache.org> on 2023/08/02 08:08:57 UTC

[GitHub] [kafka] divijvaidya commented on pull request #14136: Add metadatacache into RemoteLogManager, and refactor all relevant codes

divijvaidya commented on PR #14136:
URL: https://github.com/apache/kafka/pull/14136#issuecomment-1661714026

   I am not sure I understand why we need to access the factory method. 
   
   The metadataCache instance is created on broker startup. It is then passed to ReplicaManager. RemoteLogManager is also created on start-up and you can pass this metadataCache in the constructor of RemoteLogManager at https://github.com/apache/kafka/blob/8aaf7daff393f2b26438fb7fe28016e06e23558c/core/src/main/scala/kafka/server/BrokerServer.scala#L573 . I observed that you are already doing this in the change in this PR. 
   
   Once we have an instance inside RemoteLogManager, you can call Zk/Kraft specific functions using: `val zkMetadataCache = metadataCache.asInstanceOf[ZkMetadataCache]`  


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