Adar Dembo has submitted this change and it was merged.

Change subject: KUDU-1474: single to multi-master deployment migration
......................................................................


KUDU-1474: single to multi-master deployment migration

This patch introduces the machinery needed to migrate from a single-node
master deployment to multi-master:
1. Inclusion of the tablet copy service in the master. This was easy; the
   master module already depends on 'tserver', so registering the service is
   just a few lines of code.
2. The new "kudu" command line tool, whose operations are used in migration.
   It'll also serve as the basis for KUDU-619.
3. An end-to-end integration test to showcase the migration.

A couple notes about the new tool. I began with a gflags-based approach, but
found it unwieldy after a while, because it's tough to provide a good help
experience, and the lack of positional argument support makes for long
command lines.

I briefly looked at boost but didn't want to reintroduce a library dependency,
so I ended up writing my own (simple) parser. It maps command line arguments to
"actions" and allows for arbitrary levels of nesting, so you can do things like
"kudu tablet copy blah" as well as "kudu fs dump". At each level, if
insufficient arguments are provided, an informative help message is printed
though there's room for improvement here.

Change-Id: I89c741381ced3731736228cd07fe85106ae72541
Reviewed-on: http://gerrit.cloudera.org:8080/3880
Reviewed-by: Todd Lipcon <t...@apache.org>
Tested-by: Kudu Jenkins
---
M build-support/dist_test.py
M src/kudu/gutil/strings/join.h
M src/kudu/integration-tests/CMakeLists.txt
M src/kudu/integration-tests/external_mini_cluster.cc
M src/kudu/integration-tests/external_mini_cluster.h
A src/kudu/integration-tests/master_migration-itest.cc
M src/kudu/master/master.cc
M src/kudu/master/sys_catalog.cc
M src/kudu/master/sys_catalog.h
M src/kudu/tools/CMakeLists.txt
A src/kudu/tools/tool_action.cc
A src/kudu/tools/tool_action.h
A src/kudu/tools/tool_action_fs.cc
A src/kudu/tools/tool_action_tablet.cc
A src/kudu/tools/tool_main.cc
15 files changed, 926 insertions(+), 11 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/3880
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I89c741381ced3731736228cd07fe85106ae72541
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to