You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2017/11/04 04:01:03 UTC

[kudu-CR] tool: new action for updating the set of data directories (take 2)

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 (#8).

Change subject: tool: new action for updating the set of data directories (take 2)
......................................................................

tool: new action for updating the set of data directories (take 2)

This patch includes support for updating the set of data directories in an
existing Kudu filesystem, though it only supports adding for the time being.
The only user-facing bit is a new FsManager option that, when set, augments
Open() to also look for missing fs roots. If any are found, they will be
created, and the existing data directory instance files updated to recognize
these new roots. Also included is a new tool action that opens an FsManager
with this option set.

Updating the set of data directories is a complex, multi-step operation, and
a single error could leave the filesystem in a difficult-to-repair state. As
such, I also wrote some fairly gnarly rollback code that attempts to undo the
changes made in the event of an error.

This logic can be extended to remove data directories, but we'll need to
address KUDU-2202 first.

Change-Id: I6ddbdd6cc6231996e7802a622a8b4691527a0643
---
M src/kudu/fs/block_manager_util-test.cc
M src/kudu/fs/block_manager_util.cc
M src/kudu/fs/block_manager_util.h
M src/kudu/fs/data_dirs-test.cc
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_fs.cc
11 files changed, 688 insertions(+), 150 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/52/8352/8
-- 
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: 8
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>