Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9027 )
Change subject: KUDU-1489: allow configuration of metadata dir ...................................................................... KUDU-1489: allow configuration of metadata dir Metadata files currently reside in the first configured data directory, which isn't always the best choice; this first drive, if not performant, can act as a performance bottleneck. Often times the drive containing the WALs is a better choice, as it is recommended to be the fastest. This patch allows users to configure their metadata directory through the new fs_metadata_dir flag. If empty, Kudu will check if a metadata directory exists in the first member of fs_data_dirs, and if none exists, Kudu will use fs_wal_dir as the root directory for metadata. Otherwise, the flag will be honored verbatim. Aside from the update to the directory location, codepaths that previously assumed that the first data directory _must_ be healthy have been updated. The remaining invariant is that at least a single data directory must be healthy. The following test changes are included: - fs_manager-test: unit tests for various scenarios - data_dirs-test: a test case is updated to show that we can now open the directory manager with a failed first data directory (previously this codepath would hit D/CHECK failures) - mini_tablet_server-test: an end-to-end test is added to manually go back and forth between the old and new default metadata directories - kudu-tool-test: a small test that tools still work, but only when the appropriate FS flags are provided Change-Id: I375c6b2eb283db5fa9c956135d98252c8781f5db Reviewed-on: http://gerrit.cloudera.org:8080/9027 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Todd Lipcon <[email protected]> --- M src/kudu/fs/block_manager_util.cc M src/kudu/fs/data_dirs-test.cc M src/kudu/fs/data_dirs.cc 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/integration-tests/external_mini_cluster_fs_inspector.cc M src/kudu/tools/kudu-tool-test.cc M src/kudu/tools/tool_action_fs.cc M src/kudu/tools/tool_action_local_replica.cc M src/kudu/tserver/mini_tablet_server-test.cc 11 files changed, 347 insertions(+), 87 deletions(-) Approvals: Kudu Jenkins: Verified Adar Dembo: Looks good to me, approved Todd Lipcon: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/9027 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I375c6b2eb283db5fa9c956135d98252c8781f5db Gerrit-Change-Number: 9027 Gerrit-PatchSet: 13 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]>
