ECP-VELOC Components
User documentation for all components
redset.h File Reference

redundancy sets More...

Go to the source code of this file.

Typedefs

Define redundancy descriptor structure
typedef void * redset
 
typedef void * redset_filelist
 

Functions

Redundancy descriptor functions
int redset_init (void)
 
int redset_finalize (void)
 
kvtree * redset_config (const kvtree *config)
 
int redset_create (int type, MPI_Comm comm, const char *group, redset *d)
 
int redset_create_single (MPI_Comm comm, const char *group, redset *d)
 
int redset_create_partner (MPI_Comm comm, const char *group, int size, int replicas, redset *d)
 
int redset_create_xor (MPI_Comm comm, const char *group, int size, redset *d)
 
int redset_create_rs (MPI_Comm comm, const char *group, int size, int k, redset *d)
 
int redset_delete (redset *d)
 
int redset_apply (int numfiles, const char **files, const char *name, const redset d)
 
int redset_recover (MPI_Comm comm, const char *name, redset *d)
 
int redset_unapply (const char *name, const redset d)
 
redset_filelist redset_filelist_get (const char *name, const redset d)
 
int redset_filelist_release (redset_filelist *plist)
 
int redset_filelist_count (redset_filelist list)
 
const char * redset_filelist_file (redset_filelist list, int index)
 
redset_filelist redset_filelist_get_data_partner (int num, const char **files, int *groupsize, int **groupranks)
 
int redset_rebuild_partner (int num, const char **files, const char *prefix, const kvtree *map)
 
redset_filelist redset_filelist_get_data_xor (int num, const char **files, int *groupsize, int **groupranks)
 
int redset_rebuild_xor (int num, const char **files, const char *prefix, const kvtree *map)
 
redset_filelist redset_filelist_get_data_rs (int num, const char **files, int *groupsize, int **groupranks)
 
int redset_rebuild_rs (int num, const char **files, const char *prefix, const kvtree *map)
 

Typedef Documentation

◆ redset

typedef void* redset

Definition at line 40 of file redset.h.

◆ redset_filelist

typedef void* redset_filelist

Definition at line 41 of file redset.h.

Function Documentation

◆ redset_apply()

int redset_apply ( int  numfiles,
const char **  files,
const char *  name,
const redset  d 
)

apply redundancy scheme to file and return number of bytes copied in bytes parameter

Parameters
[in]numfiles[IN] - number of file names in files array
[in]files[IN] - list of file names of length numfiles
[in]name[IN] - path/filename prefix to prepend to redset metadata files
[in]d[IN] - redundancy decriptor to be applied

◆ redset_config()

kvtree* redset_config ( const kvtree *  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.

Returns
If config != NULL, then return config on success. If config == NULL (you're querying the config) then return a new kvtree on success, which must be kvtree_delete()ed by the caller. NULL on any failures.
Parameters
configThe new configuration. If config == NULL, then return a new kvtree with all the configuration values.
Parameters
config< [IN] - options to be set

◆ redset_create()

int redset_create ( int  type,
MPI_Comm  comm,
const char *  group,
redset d 
)

create a new redundancy set descriptor

Parameters
[in]type[IN] - redundancy encoding type: one of REDSET_COPY values
[in]comm[IN] - process group participating in set
[in]group[IN] - string specifying procs in the same failure group
[out]d[OUT] - output redundancy descriptor

◆ redset_create_partner()

int redset_create_partner ( MPI_Comm  comm,
const char *  group,
int  size,
int  replicas,
redset d 
)

create a new redundancy set descriptor for PARTNER encoding

Parameters
[in]comm[IN] - process group participating in set
[in]group[IN] - string specifying procs in the same failure group
[in]size[IN] - minimum number of ranks for a redundancy set
[in]replicas[IN] - number of partner replicas
[out]d[OUT] - output redundancy descriptor

◆ redset_create_rs()

int redset_create_rs ( MPI_Comm  comm,
const char *  group,
int  size,
int  k,
redset d 
)

create a new redundancy set descriptor for ReedSolomon encoding

Parameters
[in]comm[IN] - process group participating in set
[in]group[IN] - string specifying procs in the same failure group
[in]size[IN] - minimum number of ranks for a redundancy set
[in]k[IN] - number of encoding blocks [1,size)
[out]d[OUT] - output redundancy descriptor

◆ redset_create_single()

int redset_create_single ( MPI_Comm  comm,
const char *  group,
redset d 
)

create a new redundancy set descriptor for SINGLE encoding

Parameters
[in]comm[IN] - process group participating in set
[in]group[IN] - string specifying procs in the same failure group
[out]d[OUT] - output redundancy descriptor

◆ redset_create_xor()

int redset_create_xor ( MPI_Comm  comm,
const char *  group,
int  size,
redset d 
)

create a new redundancy set descriptor for XOR encoding

Parameters
[in]comm[IN] - process group participating in set
[in]group[IN] - string specifying procs in the same failure group
[in]size[IN] - minimum number of ranks for a redundancy set
[out]d[OUT] - output redundancy descriptor

◆ redset_delete()

int redset_delete ( redset d)

free any memory associated with the specified redundancy descriptor

Parameters
[in,out]d[INOUT] - redundancy descriptor to be freed

◆ redset_filelist_count()

int redset_filelist_count ( redset_filelist  list)

return number of files in file list

Parameters
[in]list[IN] - list of redundancy files

◆ redset_filelist_file()

const char* redset_filelist_file ( redset_filelist  list,
int  index 
)

return name of file at specified index, where 0 <= index < count and count is value returned by redset_filelist_count

Parameters
[in]list[IN] - list of redundancy files
[in]index[IN] - index into list, ranges from 0 to list count - 1

◆ redset_filelist_get()

redset_filelist redset_filelist_get ( const char *  name,
const redset  d 
)

return list of files added by redundancy scheme

Parameters
[in]name[IN] - path/filename prefix to prepend to redset metadata files
[in]d[IN] - redundancy descriptor associated with above path

◆ redset_filelist_get_data_partner()

redset_filelist redset_filelist_get_data_partner ( int  num,
const char **  files,
int *  groupsize,
int **  groupranks 
)

◆ redset_filelist_get_data_rs()

redset_filelist redset_filelist_get_data_rs ( int  num,
const char **  files,
int *  groupsize,
int **  groupranks 
)

◆ redset_filelist_get_data_xor()

redset_filelist redset_filelist_get_data_xor ( int  num,
const char **  files,
int *  groupsize,
int **  groupranks 
)

◆ redset_filelist_release()

int redset_filelist_release ( redset_filelist plist)

free file list allocated by call to redset_filelist_get

Parameters
[in,out]plist[INOUT] - address of pointer to list to be freed, sets pointer to NULL

◆ redset_finalize()

int redset_finalize ( void  )

shutdown library

◆ redset_init()

int redset_init ( void  )

initialize library

◆ redset_rebuild_partner()

int redset_rebuild_partner ( int  num,
const char **  files,
const char *  prefix,
const kvtree *  map 
)

◆ redset_rebuild_rs()

int redset_rebuild_rs ( int  num,
const char **  files,
const char *  prefix,
const kvtree *  map 
)

◆ redset_rebuild_xor()

int redset_rebuild_xor ( int  num,
const char **  files,
const char *  prefix,
const kvtree *  map 
)

◆ redset_recover()

int redset_recover ( MPI_Comm  comm,
const char *  name,
redset d 
)

rebuilds files for specified dataset id using specified redundancy descriptor, adds them to filemap, and returns REDSET_SUCCESS if all processes succeeded

Parameters
[in]comm[IN] - parent communicator containg set of processes rebuilding data
[in]name[IN] - path/filename prefix to prepend to redset metadata files
[out]d[OUT] - output redundancy descriptor

◆ redset_unapply()

int redset_unapply ( const char *  name,
const redset  d 
)

deletes redundancy data that was added in redset_apply, which is useful when cleaning up

Parameters
[in]name[IN] - path/filename prefix to prepend to redset metadata files
[in]d[IN] - redundancy descriptor associated with above path