Loading include/daemon/relocation/config_manager.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -14,8 +14,15 @@ #ifndef GEKKOFS_CONFIG_MANAGER_HPP #define GEKKOFS_CONFIG_MANAGER_HPP #include <string> #include <utility> #include <vector> namespace gkfs::relocation { std::vector<std::pair<std::string, std::string>> read_hosts_file(); void test_d2d_rpc(); Loading include/daemon/relocation/transmitter.hpp 0 → 100644 +26 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, 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. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_RELOCATION_TRANSMITTER_HPP #define GEKKOFS_RELOCATION_TRANSMITTER_HPP #include <global/rpc/distributor.hpp> namespace gkfs::relocation { void transmit_metadata(gkfs::rpc::host_t localhost); } // namespace gkfs::relocation #endif // GEKKOFS_RELOCATION_TRANSMITTER_HPP No newline at end of file include/global/rpc/rpc_types.hpp +1 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,7 @@ MERCURY_GEN_PROC(rpc_config_out_t, (hg_uint32_t)(gid))) MERCURY_GEN_PROC(rpc_relocation_start_in_t, ((hg_uint64_t)(host_id))((hg_uint64_t)(host_size))) MERCURY_GEN_PROC(rpc_relocation_start_in_t, ((hg_uint64_t)(host_id))) MERCURY_GEN_PROC(rpc_chunk_stat_in_t, ((hg_int32_t)(dummy))) Loading src/daemon/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ set(DAEMON_SRC handler/srv_metadata.cpp handler/srv_management.cpp relocation/config_manager.cpp relocation/transmitter.cpp ) set(DAEMON_HEADERS ../../include/config.hpp Loading @@ -32,6 +33,7 @@ set(DAEMON_HEADERS ../../include/daemon/handler/rpc_defs.hpp ../../include/daemon/handler/rpc_util.hpp ../../include/daemon/relocation/config_manager.hpp ../../include/daemon/relocation/transmitter.hpp ) set(DAEMON_LINK_LIBRARIES # internal libs Loading src/daemon/handler/srv_management.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ #include <daemon/daemon.hpp> #include <daemon/handler/rpc_defs.hpp> #include <daemon/handler/rpc_util.hpp> #include <daemon/backend/metadata/db.hpp> #include <daemon/relocation/transmitter.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_types.hpp> Loading Loading @@ -76,22 +76,8 @@ rpc_srv_relocation_start(hg_handle_t handle) { auto const host_id = in.host_id; auto const host_size = in.host_size; gkfs::rpc::SimpleHashDistributor distributor(host_id, host_size); cout << fmt::format("Got host_id = {} and host_size = {}\n", host_id, host_size); auto metadata_dump = GKFS_DATA->mdb()->get_all(); for(auto metadatum : metadata_dump) { if(metadatum.first == "/") { continue; } bool move = distributor.locate_file_metadata(metadatum.first) != host_id; cout << "Checking " << metadatum.first << " Val: " << metadatum.second << " Move: " << move << "\n"; } gkfs::relocation::transmit_metadata(host_id); out.err = 0; // TODO return gkfs::rpc::cleanup_respond(&handle, &in, &out); Loading Loading
include/daemon/relocation/config_manager.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -14,8 +14,15 @@ #ifndef GEKKOFS_CONFIG_MANAGER_HPP #define GEKKOFS_CONFIG_MANAGER_HPP #include <string> #include <utility> #include <vector> namespace gkfs::relocation { std::vector<std::pair<std::string, std::string>> read_hosts_file(); void test_d2d_rpc(); Loading
include/daemon/relocation/transmitter.hpp 0 → 100644 +26 −0 Original line number Diff line number Diff line /* Copyright 2018-2020, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2020, 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. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_RELOCATION_TRANSMITTER_HPP #define GEKKOFS_RELOCATION_TRANSMITTER_HPP #include <global/rpc/distributor.hpp> namespace gkfs::relocation { void transmit_metadata(gkfs::rpc::host_t localhost); } // namespace gkfs::relocation #endif // GEKKOFS_RELOCATION_TRANSMITTER_HPP No newline at end of file
include/global/rpc/rpc_types.hpp +1 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,7 @@ MERCURY_GEN_PROC(rpc_config_out_t, (hg_uint32_t)(gid))) MERCURY_GEN_PROC(rpc_relocation_start_in_t, ((hg_uint64_t)(host_id))((hg_uint64_t)(host_size))) MERCURY_GEN_PROC(rpc_relocation_start_in_t, ((hg_uint64_t)(host_id))) MERCURY_GEN_PROC(rpc_chunk_stat_in_t, ((hg_int32_t)(dummy))) Loading
src/daemon/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ set(DAEMON_SRC handler/srv_metadata.cpp handler/srv_management.cpp relocation/config_manager.cpp relocation/transmitter.cpp ) set(DAEMON_HEADERS ../../include/config.hpp Loading @@ -32,6 +33,7 @@ set(DAEMON_HEADERS ../../include/daemon/handler/rpc_defs.hpp ../../include/daemon/handler/rpc_util.hpp ../../include/daemon/relocation/config_manager.hpp ../../include/daemon/relocation/transmitter.hpp ) set(DAEMON_LINK_LIBRARIES # internal libs Loading
src/daemon/handler/srv_management.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ #include <daemon/daemon.hpp> #include <daemon/handler/rpc_defs.hpp> #include <daemon/handler/rpc_util.hpp> #include <daemon/backend/metadata/db.hpp> #include <daemon/relocation/transmitter.hpp> #include <global/rpc/distributor.hpp> #include <global/rpc/rpc_types.hpp> Loading Loading @@ -76,22 +76,8 @@ rpc_srv_relocation_start(hg_handle_t handle) { auto const host_id = in.host_id; auto const host_size = in.host_size; gkfs::rpc::SimpleHashDistributor distributor(host_id, host_size); cout << fmt::format("Got host_id = {} and host_size = {}\n", host_id, host_size); auto metadata_dump = GKFS_DATA->mdb()->get_all(); for(auto metadatum : metadata_dump) { if(metadatum.first == "/") { continue; } bool move = distributor.locate_file_metadata(metadatum.first) != host_id; cout << "Checking " << metadatum.first << " Val: " << metadatum.second << " Move: " << move << "\n"; } gkfs::relocation::transmit_metadata(host_id); out.err = 0; // TODO return gkfs::rpc::cleanup_respond(&handle, &in, &out); Loading