Hello Andrew Wong, Todd Lipcon,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8352

to look at the new patch set (#3).

Change subject: tool: new actions for adding and removing data directories
......................................................................

tool: new actions for adding and removing data directories

To add a data directory, a new FS root is created and within it, a new data
directory. Then, the set of all_uuids is updated to include the uuid of the
new data directory, and all of the on-disk instance files are updated with
the new value of all_uuids.

To remove a data directory, some sanity checks are performed, all_uuids is
updated to exclude the uuid of the data directory being removed, and all of
the on-disk instance files are updated with the new value of all_uuids.
Needless to say, removing a data directory will cause any tablet with data
in it to fail at the next startup.

In terms of the overall approach, I waffled between fully encapsulating the
new logic in FsManager/DataDirManager, and separating it out entirely.
Eventually I settled on this hybrid model where existing code in the
FsManager and DataDirManager created the roots, directories, and instance
files, while tool-specific code was responsible for updating existing
instances, fsyncing directories, and stringing it all together.

Change-Id: I6ddbdd6cc6231996e7802a622a8b4691527a0643
---
M src/kudu/fs/block_manager_util.h
M src/kudu/fs/data_dirs.cc
M src/kudu/fs/data_dirs.h
M src/kudu/fs/fs_manager-test.cc
M src/kudu/fs/fs_manager.cc
M src/kudu/fs/fs_manager.h
M src/kudu/tools/kudu-tool-test.cc
M src/kudu/tools/tool_action.cc
M src/kudu/tools/tool_action_fs.cc
9 files changed, 791 insertions(+), 110 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/52/8352/3
--
To view, visit http://gerrit.cloudera.org:8080/8352
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6ddbdd6cc6231996e7802a622a8b4691527a0643
Gerrit-Change-Number: 8352
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to