Andrew Wong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18374 )
Change subject: [tool] Add tool to copy replica from local filesystem ...................................................................... [tool] Add tool to copy replica from local filesystem Add tool to copy replica from local filesystem, it would be faster than copy from remote peers, it can be use when add more disk drivers and make data rebalanced faster between disk drivers, or can be used when migrate data from the only disk driver to another. This tool will also make data more dense than data on old data directories, that means we can save much disk space and speedup server bootstrap. We can use the tool like: kudu local_replica copy_from_local <tablet_id> [-src_fs_wal_dir=<dir>] [-src_fs_metadata_dir=<dir>] [-src_fs_data_dirs=<dirs>] [-dst_fs_wal_dir=<dir>] [-dst_fs_metadata_dir=<dir>] [-dst_fs_data_dirs=<dirs>] There are some tips to use this tool: - Using --src_* and --dst_* prefixes to clarify what directories are operating on - The server on the source filesystem must stop before coping replicas. Because the tool is standalone, it can't anchor replica's data blocks or log segments. - This tool will not delete data in the source filesystem, you should delete data manully if you want, by using kudu local_replica delete ... Change-Id: I1dcafeaad900b66f297914760c54dba887874e95 Reviewed-on: http://gerrit.cloudera.org:8080/18374 Tested-by: Kudu Jenkins Reviewed-by: Andrew Wong <[email protected]> --- M src/kudu/integration-tests/tablet_copy-itest.cc M src/kudu/master/master_runner.cc M src/kudu/mini-cluster/internal_mini_cluster.h M src/kudu/tablet/tablet_replica.cc M src/kudu/tablet/tablet_replica.h M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_local_replica.cc M src/kudu/tserver/mini_tablet_server.cc M src/kudu/tserver/mini_tablet_server.h M src/kudu/tserver/tablet_copy-test-base.h M src/kudu/tserver/tablet_copy_client-test.cc M src/kudu/tserver/tablet_copy_client.cc M src/kudu/tserver/tablet_copy_client.h M src/kudu/tserver/tablet_copy_service.cc M src/kudu/tserver/tablet_copy_service.h M src/kudu/tserver/tablet_copy_source_session-test.cc M src/kudu/tserver/tablet_copy_source_session.cc M src/kudu/tserver/tablet_copy_source_session.h M src/kudu/tserver/ts_tablet_manager.cc 19 files changed, 1,040 insertions(+), 243 deletions(-) Approvals: Kudu Jenkins: Verified Andrew Wong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/18374 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1dcafeaad900b66f297914760c54dba887874e95 Gerrit-Change-Number: 18374 Gerrit-PatchSet: 17 Gerrit-Owner: Yingchun Lai <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Yingchun Lai <[email protected]>
