Loading include/daemon/backend/metadata/db.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #define GEKKOFS_METADATA_DB_HPP #include <memory> #include <spdlog/spdlog.h> #include <rocksdb/db.h> #include <daemon/backend/exceptions.hpp> #include <tuple> Loading @@ -44,6 +45,7 @@ private: rdb::Options options; rdb::WriteOptions write_opts; std::string path; std::shared_ptr<spdlog::logger> log_; static void optimize_rocksdb_options(rdb::Options& options); Loading include/daemon/backend/metadata/metadata_module.hpp 0 → 100644 +70 −0 Original line number Diff line number Diff line /* Copyright 2018-2021, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2021, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS. GekkoFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: GPL-3.0-or-later */ #ifndef GEKKOFS_DAEMON_METADATA_LOGGING_HPP #define GEKKOFS_DAEMON_METADATA_LOGGING_HPP #include <spdlog/spdlog.h> namespace gkfs::data { class MetadataModule { private: MetadataModule() = default; std::shared_ptr<spdlog::logger> log_; public: static constexpr const char* LOGGER_NAME = "MetadataModule"; static MetadataModule* getInstance() { static MetadataModule instance; return &instance; } MetadataModule(MetadataModule const&) = delete; void operator=(MetadataModule const&) = delete; const std::shared_ptr<spdlog::logger>& log() const; void log(const std::shared_ptr<spdlog::logger>& log); }; #define GKFS_METADATA_MOD \ (static_cast<gkfs::data::MetadataModule*>( \ gkfs::data::MetadataModule::getInstance())) } // namespace gkfs::data #endif // GEKKOFS_DAEMON_METADATA_LOGGING_HPP src/daemon/CMakeLists.txt +1 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_subdirectory(backend/metadata) add_subdirectory(backend/data) add_subdirectory(backend) set(DAEMON_SRC ../common/rpc/rpc_util.cpp Loading src/daemon/backend/CMakeLists.txt 0 → 100644 +30 −0 Original line number Diff line number Diff line ################################################################################ # Copyright 2018-2021, Barcelona Supercomputing Center (BSC), Spain # # Copyright 2015-2021, Johannes Gutenberg Universitaet Mainz, Germany # # # # This software was partially supported by the # # EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). # # # # This software was partially supported by the # # ADA-FS project under the SPPEXA project funded by the DFG. # # # # This file is part of GekkoFS. # # # # GekkoFS is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # GekkoFS is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. # # # # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_subdirectory(metadata) add_subdirectory(data) src/daemon/backend/data/CMakeLists.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,22 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_library(data_module STATIC ) target_sources(data_module PUBLIC ${INCLUDE_DIR}/daemon/backend/data/data_module.hpp PRIVATE ${CMAKE_CURRENT_LIST_DIR}/data_module.cpp ) target_link_libraries(data_module PUBLIC spdlog ) add_library(storage STATIC) target_sources(storage Loading @@ -43,6 +59,7 @@ target_sources(storage target_link_libraries(storage PRIVATE spdlog data_module # open issue for std::filesystem https://gitlab.kitware.com/cmake/cmake/-/issues/17834 stdc++fs -ldl Loading Loading
include/daemon/backend/metadata/db.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ #define GEKKOFS_METADATA_DB_HPP #include <memory> #include <spdlog/spdlog.h> #include <rocksdb/db.h> #include <daemon/backend/exceptions.hpp> #include <tuple> Loading @@ -44,6 +45,7 @@ private: rdb::Options options; rdb::WriteOptions write_opts; std::string path; std::shared_ptr<spdlog::logger> log_; static void optimize_rocksdb_options(rdb::Options& options); Loading
include/daemon/backend/metadata/metadata_module.hpp 0 → 100644 +70 −0 Original line number Diff line number Diff line /* Copyright 2018-2021, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2021, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. This file is part of GekkoFS. GekkoFS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GekkoFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. SPDX-License-Identifier: GPL-3.0-or-later */ #ifndef GEKKOFS_DAEMON_METADATA_LOGGING_HPP #define GEKKOFS_DAEMON_METADATA_LOGGING_HPP #include <spdlog/spdlog.h> namespace gkfs::data { class MetadataModule { private: MetadataModule() = default; std::shared_ptr<spdlog::logger> log_; public: static constexpr const char* LOGGER_NAME = "MetadataModule"; static MetadataModule* getInstance() { static MetadataModule instance; return &instance; } MetadataModule(MetadataModule const&) = delete; void operator=(MetadataModule const&) = delete; const std::shared_ptr<spdlog::logger>& log() const; void log(const std::shared_ptr<spdlog::logger>& log); }; #define GKFS_METADATA_MOD \ (static_cast<gkfs::data::MetadataModule*>( \ gkfs::data::MetadataModule::getInstance())) } // namespace gkfs::data #endif // GEKKOFS_DAEMON_METADATA_LOGGING_HPP
src/daemon/CMakeLists.txt +1 −2 Original line number Diff line number Diff line Loading @@ -26,8 +26,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_subdirectory(backend/metadata) add_subdirectory(backend/data) add_subdirectory(backend) set(DAEMON_SRC ../common/rpc/rpc_util.cpp Loading
src/daemon/backend/CMakeLists.txt 0 → 100644 +30 −0 Original line number Diff line number Diff line ################################################################################ # Copyright 2018-2021, Barcelona Supercomputing Center (BSC), Spain # # Copyright 2015-2021, Johannes Gutenberg Universitaet Mainz, Germany # # # # This software was partially supported by the # # EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). # # # # This software was partially supported by the # # ADA-FS project under the SPPEXA project funded by the DFG. # # # # This file is part of GekkoFS. # # # # GekkoFS is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # GekkoFS is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with GekkoFS. If not, see <https://www.gnu.org/licenses/>. # # # # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_subdirectory(metadata) add_subdirectory(data)
src/daemon/backend/data/CMakeLists.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,22 @@ # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ add_library(data_module STATIC ) target_sources(data_module PUBLIC ${INCLUDE_DIR}/daemon/backend/data/data_module.hpp PRIVATE ${CMAKE_CURRENT_LIST_DIR}/data_module.cpp ) target_link_libraries(data_module PUBLIC spdlog ) add_library(storage STATIC) target_sources(storage Loading @@ -43,6 +59,7 @@ target_sources(storage target_link_libraries(storage PRIVATE spdlog data_module # open issue for std::filesystem https://gitlab.kitware.com/cmake/cmake/-/issues/17834 stdc++fs -ldl Loading