Hi Chris,

I also feel that extracting separate DataNodeCommandLine and 
ConfigNodeCommandLine classes is not really necessary. 

When observing the DataNode startup process, although the main function is in 
DataNode, it needs to first go around to DataNodeCommandLine and then back to 
DataNode. This convoluted call process confuses me. Perhaps this is an attempt 
to separate the command line from the main class? Or maybe this is just a 
history design?

Anyway, I'm looking forward to you simplifying the logic here.

LiYuHeng

> 2024年8月7日 22:42,Christofer Dutz <[email protected]> 写道:
> 
> Hi all,
> 
> while working on cleaning up on some config-node removal, I am struggling a 
> bit with the structure of our code.
> For example, the main entry point for a program is “DataNode” and 
> “ConfigNode”, but the main methods, redirect control to a “commandline” 
> instance.
> Depending on the command issued, the commandline then needs to reference back 
> to the same instance that called the commandLine do to some other things.
> 
> I think as both DataNode and ConfigNode only implement an mbean interface, it 
> would be cleaner to move the CLI stuff into the main classes and move the 
> stuff for starting and stopping nodes into “command” implementations for the 
> CLI? This mixture is hard to test and maintain.
> 
> Also, could the think about basing the CLI on Apache Commons CLI, however 
> that could bring changes in output with it.
> 
> What do you others think?
> 
> Chris

Reply via email to