Loading include/common/env.hpp +6 −0 Changes for include/common/env.hpp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -58,6 +58,12 @@ static constexpr auto DISTRIBUTION_STRATEGY = ADD_PREFIX("DISTRIBUTION_STRATEGY"); static constexpr auto RANDOM_SLICING_CUTSHIFT = ADD_PREFIX("RANDOM_SLICING_CUTSHIFT"); static constexpr auto RANDOM_SLICING_CALIBRATION = ADD_PREFIX("RANDOM_SLICING_CALIBRATION"); static constexpr auto RANDOM_SLICING_CALIBRATION_SECONDS = ADD_PREFIX("RANDOM_SLICING_CALIBRATION_SECONDS"); static constexpr auto RANDOM_SLICING_CALIBRATION_MIN_MBPS = ADD_PREFIX("RANDOM_SLICING_CALIBRATION_MIN_MBPS"); static constexpr auto EXPAND_ON_DEMAND = ADD_PREFIX("EXPAND_ON_DEMAND"); static constexpr auto NUM_REPL = ADD_PREFIX("NUM_REPL"); static constexpr auto CREATE_CHECK_PARENTS = ADD_PREFIX("CREATE_CHECK_PARENTS"); Loading include/common/hostfile_management.hpp +4 −0 Changes for include/common/hostfile_management.hpp: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -135,6 +135,10 @@ get_marker(const std::string& line); HostfileMarkers parse_hostfile_markers(const std::string& path); /** Return per-host RS weights in the same sorted order as hostfile_pairs(). */ std::vector<float> hostfile_rs_weights(const std::string& path); /** * @brief Validate a marker-based hostfile topology. * @param markers Parsed hostfile markers Loading include/common/rpc/random_slicing_distributor.hpp +7 −0 Changes for include/common/rpc/random_slicing_distributor.hpp: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ private: host_t localhost_; unsigned int hosts_size_{0}; std::vector<host_t> all_hosts_; std::vector<float> weights_; std::vector<Partition> partitions_; IntervalIndex interval_idx_; Loading @@ -166,6 +167,8 @@ private: public: explicit RandomSlicingDistributor(host_t localhost, unsigned int hosts_size); RandomSlicingDistributor(host_t localhost, unsigned int hosts_size, const std::vector<float>& weights); RandomSlicingDistributor() = default; // Distributor interface Loading Loading @@ -202,6 +205,10 @@ public: bool set_intervals(const std::vector<Interval>& intervals); /** @brief Set per-host relative capacities and rebuild the layout. */ void set_weights(const std::vector<float>& weights); /** @brief Return the current flat interval table. */ std::vector<Interval> get_intervals() const; Loading include/daemon/env.hpp +1 −0 Changes for include/daemon/env.hpp: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ namespace gkfs::env { static constexpr auto METADATA_DB_PATH = ADD_PREFIX("METADATA_DB_PATH"); static constexpr auto HOSTS_FILE = COMMON_ENV_PREFIX "HOSTS_FILE"; static constexpr auto DAEMON_2ND_ROOT = ADD_PREFIX("2ND_ROOT"); static constexpr auto DAEMON_CREATE_EXIST_CHECK = ADD_PREFIX("CREATE_EXIST_CHECK"); static constexpr auto KEEP_HOSTS_FILE = ADD_PREFIX("KEEP_HOSTS_FILE"); Loading include/daemon/util.hpp +8 −0 Changes for include/daemon/util.hpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ #define GEKKOFS_DAEMON_UTIL_HPP namespace gkfs::utils { /** Select the optional secondary storage root after calibration. */ void prepare_storage_root(); /** Return the calibrated weight for the selected storage root. */ float storage_calibration_weight(); /** * @brief Registers the daemon's RPC address to the shared hosts file. * @param expand_mode If true, prepend '+' marker to the line Loading Loading
include/common/env.hpp +6 −0 Changes for include/common/env.hpp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -58,6 +58,12 @@ static constexpr auto DISTRIBUTION_STRATEGY = ADD_PREFIX("DISTRIBUTION_STRATEGY"); static constexpr auto RANDOM_SLICING_CUTSHIFT = ADD_PREFIX("RANDOM_SLICING_CUTSHIFT"); static constexpr auto RANDOM_SLICING_CALIBRATION = ADD_PREFIX("RANDOM_SLICING_CALIBRATION"); static constexpr auto RANDOM_SLICING_CALIBRATION_SECONDS = ADD_PREFIX("RANDOM_SLICING_CALIBRATION_SECONDS"); static constexpr auto RANDOM_SLICING_CALIBRATION_MIN_MBPS = ADD_PREFIX("RANDOM_SLICING_CALIBRATION_MIN_MBPS"); static constexpr auto EXPAND_ON_DEMAND = ADD_PREFIX("EXPAND_ON_DEMAND"); static constexpr auto NUM_REPL = ADD_PREFIX("NUM_REPL"); static constexpr auto CREATE_CHECK_PARENTS = ADD_PREFIX("CREATE_CHECK_PARENTS"); Loading
include/common/hostfile_management.hpp +4 −0 Changes for include/common/hostfile_management.hpp: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -135,6 +135,10 @@ get_marker(const std::string& line); HostfileMarkers parse_hostfile_markers(const std::string& path); /** Return per-host RS weights in the same sorted order as hostfile_pairs(). */ std::vector<float> hostfile_rs_weights(const std::string& path); /** * @brief Validate a marker-based hostfile topology. * @param markers Parsed hostfile markers Loading
include/common/rpc/random_slicing_distributor.hpp +7 −0 Changes for include/common/rpc/random_slicing_distributor.hpp: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ private: host_t localhost_; unsigned int hosts_size_{0}; std::vector<host_t> all_hosts_; std::vector<float> weights_; std::vector<Partition> partitions_; IntervalIndex interval_idx_; Loading @@ -166,6 +167,8 @@ private: public: explicit RandomSlicingDistributor(host_t localhost, unsigned int hosts_size); RandomSlicingDistributor(host_t localhost, unsigned int hosts_size, const std::vector<float>& weights); RandomSlicingDistributor() = default; // Distributor interface Loading Loading @@ -202,6 +205,10 @@ public: bool set_intervals(const std::vector<Interval>& intervals); /** @brief Set per-host relative capacities and rebuild the layout. */ void set_weights(const std::vector<float>& weights); /** @brief Return the current flat interval table. */ std::vector<Interval> get_intervals() const; Loading
include/daemon/env.hpp +1 −0 Changes for include/daemon/env.hpp: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ namespace gkfs::env { static constexpr auto METADATA_DB_PATH = ADD_PREFIX("METADATA_DB_PATH"); static constexpr auto HOSTS_FILE = COMMON_ENV_PREFIX "HOSTS_FILE"; static constexpr auto DAEMON_2ND_ROOT = ADD_PREFIX("2ND_ROOT"); static constexpr auto DAEMON_CREATE_EXIST_CHECK = ADD_PREFIX("CREATE_EXIST_CHECK"); static constexpr auto KEEP_HOSTS_FILE = ADD_PREFIX("KEEP_HOSTS_FILE"); Loading
include/daemon/util.hpp +8 −0 Changes for include/daemon/util.hpp: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ #define GEKKOFS_DAEMON_UTIL_HPP namespace gkfs::utils { /** Select the optional secondary storage root after calibration. */ void prepare_storage_root(); /** Return the calibrated weight for the selected storage root. */ float storage_calibration_weight(); /** * @brief Registers the daemon's RPC address to the shared hosts file. * @param expand_mode If true, prepend '+' marker to the line Loading