heesung-sn commented on PR #15264: URL: https://github.com/apache/pulsar/pull/15264#issuecomment-1121297658
> > Regarding CLI java version, because CLI has dependencies on broker modules, it needs to follow broker's java version. > > @heesung-sn Why does the CLI depend on broker modules? Would it be possible to break these dependencies so that the CLI could run on older Java versions? I see that many CLI commands directly call broker logics, acting as a "kind-of" broker. For example, `pulsar compact-topic` cli command, it internally calls `org.apache.pulsar.compaction.CompactorTool.main()`, and as you can see CompactorTool class internally depends on many broker classes/modules. https://github.com/apache/pulsar/blob/6d9ba7b60ab97257aa6e4e032a9764b5c3aefffa/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactorTool.java#L33-L46 Specifically, this `CompactorTool` main func directly calls the broker compaction logic like the below https://github.com/apache/pulsar/blob/6d9ba7b60ab97257aa6e4e032a9764b5c3aefffa/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactorTool.java#L151-L156 I think it is possible to break these dependencies, but this requires some serious work. For example, we need to redesign CLI as a pure request/wait client, and there should be a backend async executor service on broker(or on a separate server) that runs the actual CLI logics. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
