Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14871 )
Change subject: fs: separate out directory management code ...................................................................... fs: separate out directory management code This splits directory management code out of the DataDirManager and into its own DirManager class that serves as the parent class of DataDirManager. All code related to initialization logic of the directory manager is moved into DirManager. Code that involves directory grouping is left to the DataDirManager, since I expect this to vary from directory manager to directory manager (e.g. I imagine that WALs will only use a single directory per tablet instead of being spread across multiple directories). I swapped from using DataDir everywhere to using the more generic Dir. The former implements the latter, but allows for the honoring and usage of the correct gflags (i.e. those defined for data directories). The Google C++ style guide recommends against using protected member variables, which I use in the DirManager base class. I think we've been somewhat permissive when it comes to following this rule, so I went with protected members to facilitate reuse. This patch only moves code around -- it doesn't change any existing logic. Change-Id: I633e1e32845b08eb24c5327a04af344b579b186a Reviewed-on: http://gerrit.cloudera.org:8080/14871 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Adar Dembo <[email protected]> --- M src/kudu/fs/CMakeLists.txt M src/kudu/fs/block_manager-stress-test.cc M src/kudu/fs/block_manager-test.cc M src/kudu/fs/data_dirs-test.cc M src/kudu/fs/data_dirs.cc M src/kudu/fs/data_dirs.h A src/kudu/fs/dir_manager.cc A src/kudu/fs/dir_manager.h M src/kudu/fs/error_manager.h M src/kudu/fs/file_block_manager.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/fs/log_block_manager-test.cc M src/kudu/fs/log_block_manager.cc M src/kudu/fs/log_block_manager.h M src/kudu/tools/kudu-tool-test.cc M src/kudu/tserver/tablet_copy_client-test.cc M src/kudu/tserver/tablet_copy_service-test.cc M src/kudu/tserver/tablet_server-test.cc M src/kudu/tserver/ts_tablet_manager.cc M src/kudu/tserver/ts_tablet_manager.h 22 files changed, 1,472 insertions(+), 1,246 deletions(-) Approvals: Adar Dembo: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/14871 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I633e1e32845b08eb24c5327a04af344b579b186a Gerrit-Change-Number: 14871 Gerrit-PatchSet: 8 Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
