Marton Greber has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24906


Change subject: KUDU-3806: split CLI actions into a library
......................................................................

KUDU-3806: split CLI actions into a library

Move the top-level mode list out of tool_main.cc's RootMode() into a new
BuildRootMode() (tool_action_root.cc), and build the CLI action factories
into a kudu_cli_actions static library with the 'kudu' executable reduced
to a thin main() linked against it.

This lets unit tests reconstruct the full action tree in-process by
linking the library, instead of recompiling every tool_action_*.cc source
into each test. It is also the single source of truth for the top-level
mode list, so a newly added mode is wired in one place rather than
mirrored across main() and its consumers.

Pure refactor: the 'kudu' binary is unchanged. tool_action_root.cc lives
in its own translation unit (part of the CLI sources) rather than in the
low-level kudu_tools_util library, so referencing every Build*Mode()
factory does not inject undefined symbols into kudu_tools_util consumers
such as ksck.

Change-Id: I3c47cf1844042fc09493edf18652493742187f03
Co-Authored-By: Claude Opus 4.8 <[email protected]>
---
M src/kudu/tools/CMakeLists.txt
M src/kudu/tools/tool_action.h
A src/kudu/tools/tool_action_root.cc
M src/kudu/tools/tool_main.cc
4 files changed, 105 insertions(+), 32 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/06/24906/1
--
To view, visit http://gerrit.cloudera.org:8080/24906
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c47cf1844042fc09493edf18652493742187f03
Gerrit-Change-Number: 24906
Gerrit-PatchSet: 1
Gerrit-Owner: Marton Greber <[email protected]>

Reply via email to