ECP-VeloC / redset

Low-level distributed erasure coding library to protect datasets of MPI applications
MIT License
2 stars 3 forks source link

add key value configuration interface to to redset #19

Closed rhaas80 closed 3 years ago

rhaas80 commented 4 years ago

This pull request adds a configuration interface to filo, similar in functionality to the one in AXL. Specifically it adds a new function redset_config:

/**
 * Get/set redset configuration values.
 *
 * The following configuration options can be set (type in parenthesis):
 *   * "DEBUG" (int) - if non-zero, output debug information from inside
 *     redset.
 *   * "SETSIZE" (int) - set size for redset to use.
 *   * "MPI_BUF_SIZE" (byte count [IN], int [OUT]) - MPI buffer size to chunk
 *     file transfer. Must not exceed INT_MAX.
 *   .
 * Symbolic names REDSET_KEY_CONFIG_FOO are defined in redset.h and should
 * be used instead of the strings whenever possible to guard against typos in
 * strings.
 *
 * \result If config != NULL, then return config on success.  If config=NULL
 *         (you're querying the config) then return a new kvtree on success.
 *         NULL on any failures.
 * \param config The new configuration. If config=NULL, then return a kvtree
 *                with all the configuration values.
 *
 */
kvtree* redset_config(
  const kvtree *config /** < [IN] - options to be set */
);

as well as a new test test_config to check functionality of this interface.

Querying options will return redset's the current value of the options.

Options can be configured multiple times at runtime and it is the user's responsibility ensure that this does not lead to problems.

adammoody commented 4 years ago

For future work, we can add a parameter for the default number of PARTNER replicas or default number of RS encoding blocks. However, we need to rename the SCR parameter for this, so let's wait to do that. I just bring this up so you can help remind us if I forget.

adammoody commented 3 years ago

Thanks @rhaas80 !