Containers¶
Functions
-
static perr_t PDC_cont_close(struct _pdc_cont_info *cp)¶
-
perr_t PDC_cont_init()¶
container initialization
- Returns:
Non-negative on success/Negative on failure
-
pdcid_t PDCcont_create(const char *cont_name, pdcid_t cont_prop_id)¶
Create a container.
- Parameters:
cont_name – [IN] Name of the container
cont_create_prop – [IN] ID of container property returned by PDCprop_create(PDC_CONT_CREATE)
- Returns:
Container id on success/Zero on failure
-
pdcid_t PDCcont_create_col(const char *cont_name, pdcid_t cont_prop_id)¶
Create a container, used when all ranks are trying to create the same container.
- Parameters:
cont_name – [IN] Name of the container
cont_prop_id – [IN] ID of container property returned by PDCprop_create(PDC_CONT_CREATE)
- Returns:
Container id on success/Zero on failure
-
pdcid_t PDC_cont_create_local(pdcid_t pdc, const char *cont_name, uint64_t cont_meta_id)¶
Create a container locally.
- Parameters:
pdc – [IN] PDC ID
cont_name – [IN] Name of the container
cont_meta_id – [out] Metadata id of container
- Returns:
Container id on success/Zero on failure
-
perr_t PDC_cont_list_null()¶
Check if container list is empty.
- Parameters:
pdc_id – [IN] ID of the PDC
- Returns:
SUCCEED if empty/FAIL if not empty
-
perr_t PDCcont_close(pdcid_t id)¶
Close a container.
- Parameters:
cont_id – [IN] Container id, returned by PDCcont_open(pdcid_t pdc_id, const char *cont_name)
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDC_cont_end()¶
PDC container finalize.
- Returns:
Non-negative on success/Negative on failure
-
pdcid_t PDCcont_open(const char *cont_name, pdcid_t pdc)¶
Open a container.
- Parameters:
cont_name – [IN] Name of the container
pdc_id – [IN] ID of pdc
- Returns:
Container id on success/Zero on failure
-
pdcid_t PDCcont_open_col(const char *cont_name, pdcid_t pdc)¶
Open a container collectively.
- Parameters:
cont_name – [IN] Name of the container
pdc_id – [IN] ID of pdc
- Returns:
Container id on success/Zero on failure
-
struct _pdc_cont_info *PDC_cont_get_info(pdcid_t cont_id)¶
Return a container property.
- Parameters:
cont_name – [IN] Name of the container
- Returns:
Container struct on success/NULL on failure
-
struct pdc_cont_info *PDCcont_get_info(const char *cont_name)¶
Return a container property.
- Parameters:
cont_name – [IN] Name of the container
- Returns:
Container struct on success/NULL on failure
-
cont_handle *PDCcont_iter_start()¶
Iterate over containers within a PDC.
- Returns:
Pointer to cont_handle struct/NULL on failure
-
pbool_t PDCcont_iter_null(cont_handle *chandle)¶
Check if container handle is pointing to NULL.
- Parameters:
chandle – [IN] Pointer to cont_handle struct, returned by PDCcont_iter_start(pdcid_t pdc_id)
- Returns:
1 on success/0 on failure
-
cont_handle *PDCcont_iter_next(cont_handle *chandle)¶
Move to the next container within a PDC.
- Parameters:
chandle – [IN] Pointer to cont_handle struct, returned by PDCcont_iter_start(pdcid_t pdc_id)
- Returns:
Pointer to cont_handle struct/NULL on failure
-
struct pdc_cont_info *PDCcont_iter_get_info(cont_handle *chandle)¶
Retrieve container information.
- Parameters:
chandle – [IN] A cont_handle struct, returned by PDCcont_iter_start(pdcid_t pdc_id)
- Returns:
Pointer to a PDC_cont_info struct/NULL on failure
-
perr_t PDCcont_persist(pdcid_t cont_id)¶
Persist a transient container.
- Parameters:
cont_id – [IN] ID of the container, returned by PDCcont_open(pdcid_t pdc_id, const char *cont_name)
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_cont_lifetime(pdcid_t cont_prop, pdc_lifetime_t cont_lifetime)¶
Set container lifetime.
- Parameters:
cont_create_prop – [IN] ID of container property, returned by PDCprop_create(PDC_CONT_CREATE)
cont_lifetime – [IN] container lifetime (enum type), PDC_PERSIST or PDC_TRANSIENT
- Returns:
Non-negative on success/Negative on failure
Objects¶
Functions
-
static perr_t PDC_obj_close(struct _pdc_obj_info *op)¶
-
perr_t PDC_obj_init()¶
PDC object initialization.
- Returns:
Non-negative on success/Negative on failure
-
pdcid_t PDCobj_create(pdcid_t cont_id, const char *obj_name, pdcid_t obj_prop_id)¶
Create an object.
- Parameters:
cont_id – [IN] ID of the container
obj_name – [IN] Name of the object
obj_create_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
- Returns:
Object id on success/Zero on failure
-
static perr_t PDC_Client_attach_metadata_to_local_obj(const char *obj_name, uint64_t obj_id, uint64_t cont_id, uint32_t data_server_id, pdc_region_partition_t region_partition, pdc_consistency_t consistency, struct _pdc_obj_info *obj_info)¶
Copy the metadata to local object property, internal function.
- Parameters:
obj_name[IN] – Object name
obj_id[IN] – Object ID (global, obtained from metadata server)
cont_id[IN] – Container id (global, obtained from metadata server)
dataserver_id[IN] – Data server id (global, obtained from metadata server)
region_partition[IN] – region_partition for the object
consistency[IN] – consistency for the object
obj_info[IN] – Object property
- Returns:
Non-negative on success/Negative on failure
-
pdcid_t PDC_obj_create(pdcid_t cont_id, const char *obj_name, pdcid_t obj_prop_id, _pdc_obj_location_t location)¶
Create an object.
- Parameters:
cont_id – [IN] ID of the container
obj_name – [IN] Name of the object
obj_create_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
location – [IN] PDC_OBJ_GLOBAL/PDC_OBJ_LOCAL
- Returns:
Object id on success/Negative on failure
-
perr_t PDC_obj_list_null()¶
Check if object list is empty.
- Returns:
SUCCEED if empty/FAIL if not empty
-
perr_t PDCobj_flush_start(pdcid_t obj_id)¶
Force write-back of the object from its cache.
This function does not guarantee the finish of flushing. Only useful when server cache is enabled.
- Parameters:
obj_id – [IN] ID of the object
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCobj_flush_all_start()¶
Force write-back of all objects from its cache.
This function does not guarantee the finish of flushing. Only useful when server cache is enabled.
- Parameters:
obj_id – [IN] ID of the object
- Returns:
Non-negative on success/Negative on failure
- perr_t PDCobj_flush_start (pdcid_t obj_id __attribute__((unused)))
-
perr_t PDCobj_close(pdcid_t obj_id)¶
Close an object.
- Parameters:
obj_id – [IN] ID of the object
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDC_obj_end()¶
PDC object finalize.
- Returns:
Non-negative on success/Negative on failure
-
static pdcid_t PDCobj_open_common(const char *obj_name, pdcid_t pdc, int is_col)¶
-
pdcid_t PDCobj_open(const char *obj_name, pdcid_t pdc)¶
Open an object within a container.
- Parameters:
pdc_id – [IN] ID of pdc
obj_name – [IN] Name of the object
- Returns:
Object id on success/Zero on failure
-
pdcid_t PDCobj_open_col(const char *obj_name, pdcid_t pdc)¶
Open an object within a container collectively.
- Parameters:
pdc_id – [IN] ID of pdc
obj_name – [IN] Name of the object
- Returns:
Object id on success/Zero on failure
-
obj_handle *PDCobj_iter_start(pdcid_t cont_id)¶
Iterate over objects in a container.
- Parameters:
cont_id – [IN] Container ID, returned by PDCobj_open(pdcid_t pdc_id, const char *cont_name)
- Returns:
A pointer to object handle struct on success/NULL on failure
-
pbool_t PDCobj_iter_null(obj_handle *ohandle)¶
Check if object handle is pointing to NULL.
- Parameters:
ohandle – [IN] A obj_handle struct, returned by PDCobj_iter_start(pdcid_t cont_id)
- Returns:
1 on success/0 on failure
-
obj_handle *PDCobj_iter_next(obj_handle *ohandle, pdcid_t cont_id)¶
Iterate the next object.
- Parameters:
ohandle – [IN] A obj_handle struct, returned by PDCobj_iter_start(pdcid_t cont_id)
cont_id – [IN] ID of the container
- Returns:
A pointer to object handle struct on success/Zero on failure
-
struct pdc_obj_info *PDCobj_iter_get_info(obj_handle *ohandle)¶
Get object information.
- Parameters:
ohandle – [IN] A pointer to obj_handle struct, returned by PDCobj_iter_start(pdcid_t cont_id)
- Returns:
Pointer to a pdc_obj_info struct on success/NULL on failure
-
perr_t PDCprop_set_obj_user_id(pdcid_t obj_prop, uint32_t user_id)¶
Set object user ID.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
user_id – [IN] User id
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_app_name(pdcid_t obj_prop, char *app_name)¶
Set object application name.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
app_name – [IN] Application name
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_time_step(pdcid_t obj_prop, uint32_t time_step)¶
Set object time step.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
time_step – [IN] Time step
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_data_loc(pdcid_t obj_prop, char *loc)¶
Set object data location.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
app_name – [IN] Data location path
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_tags(pdcid_t obj_prop, char *tags)¶
Set object tag.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
tags – [IN] Tags
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_dims(pdcid_t obj_prop, PDC_int_t ndim, uint64_t *dims)¶
Set object dimension.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
ndim – [IN] Number of dimensions
dims – [IN] Size of each dimension, positive value, can be PDC_SIZE_UNLIMITED
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_type(pdcid_t obj_prop, pdc_var_type_t type)¶
Set object type.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
type – [IN] Object variable type (enum type), i.e. PDC_int_t, PDC_float_t
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_transfer_region_type(pdcid_t obj_prop, pdc_region_partition_t region_partition)¶
Set object transfer partitioning.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
type – [IN] Object transfer partitioning method (enum type), i.e. PDC_OBJ_STATIC, PDC_REGION_STATIC, PDC_REGION_DYNAMIC
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_consistency_semantics(pdcid_t obj_prop, pdc_consistency_t consistency)¶
Set object consistency semantics.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
consistency – [IN] Consistency semantics required e.g., PDC_CONSISTENCY_DEFAULT, PDC_CONSISTENCY_POSIX, etc
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCprop_set_obj_buf(pdcid_t obj_prop, void *buf)¶
Set an object buffer.
- Parameters:
obj_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
buf – [IN] Starting point of object storage
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCobj_set_dims(pdcid_t obj_id, int ndim, uint64_t *dims)¶
Reset obj dimension.
- Parameters:
obj_id – [IN] ID of object,
ndim – [IN] number of dimensions, this one must match existing record.
dims – [IN] new dimensions to be set
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDCobj_get_dims(pdcid_t obj_id, int *ndim, uint64_t **dims)¶
Get obj dimension.
- Parameters:
obj_id – [IN] ID of object,
ndim – [OUT] number of dimensions, this one must match existing record.
dims – [OUT] new dimensions to be set
- Returns:
Non-negative on success/Negative on failure
-
void **PDCobj_buf_retrieve(pdcid_t obj_id)¶
get obj dimension
- Parameters:
obj_id – [IN] ID of object,
ndim – [IN] number of object dimensions
dims – [IN] object dimensions, in a newly malloced buffer.
- Returns:
Non-negative on success/Negative on failure
-
struct _pdc_obj_info *PDC_obj_get_info(pdcid_t obj_id)¶
Get object information.
- Parameters:
obj_id – [IN] ID of the object
- Returns:
Pointer to _pdc_obj_info struct on success/Null on failure
-
perr_t PDC_free_obj_info(struct _pdc_obj_info *obj)
Free object information.
- Parameters:
obj_id – [IN] ID of the object
- Returns:
Non-negative on success/Negative on failure
-
struct pdc_obj_info *PDCobj_get_info(pdcid_t obj_id)¶
Get object information.
- Parameters:
obj_name – [IN] Name of the object
- Returns:
Pointer to pdc_obj_info struct on success/Null on failure
-
perr_t PDCobj_del(pdcid_t obj_id)¶
- Parameters:
obj_id – [IN] Object ID
- Returns:
Non-negative on success/Negative on failure
Functions
-
pdcid_t PDCobj_create_mpi(pdcid_t cont_id, const char *obj_name, pdcid_t obj_prop_id, int rank_id, MPI_Comm comm)¶
Create an object.
- Parameters:
cont_id – [IN] ID of the container
obj_name – [IN] Name of the object
obj_create_prop – [IN] ID of object property, returned by PDCprop_create(PDC_OBJ_CREATE)
rank_id – [IN] MPI process rank
- Returns:
Object ID on success/Negative on failure
-
perr_t PDCobj_encode(pdcid_t obj_id, pdcid_t *meta_id)¶
-
pdcid_t PDCobj_decode(pdcid_t obj_id, pdcid_t meta_id)¶
Preperties¶
Functions
-
static perr_t pdc_prop_cont_close(struct _pdc_cont_prop *cp)¶
-
static perr_t pdc_prop_obj_close(struct _pdc_obj_prop *cp)¶
-
perr_t PDC_prop_init()¶
PDC container and object property initialization.
- Returns:
Non-negative on success/Negative on failure
-
pdcid_t PDCprop_create(pdc_prop_type_t type, pdcid_t pdcid)¶
Create PDC property.
- Parameters:
type – [IN] PDC property creation type (enum type), PDC_CONT_CREATE or PDC_OBJ_CREATE
id – [IN] ID of the PDC
- Returns:
PDC property id on success/Zero on failure
-
pdcid_t PDCprop_obj_dup(pdcid_t prop_id)¶
Quickly create object property from an existing object property Share the same property with the existing one other than data_loc, data type, buf, which are data related.
- Parameters:
type – [IN] PDC property creation type (enum type), PDC_CONT_CREATE or PDC_OBJ_CREATE
id – [IN] ID of the PDC
- Returns:
PDC property id on success/Zero on failure
-
perr_t PDC_prop_cont_list_null()¶
Check if container property list is empty.
- Returns:
SUCCEED if empty/FAIL if not empty
-
perr_t PDC_prop_obj_list_null()¶
Check if object property list is empty.
- Returns:
SUCCEED if empty/FAIL if not empty
-
perr_t PDCprop_close(pdcid_t id)¶
Close property.
- Parameters:
id – [IN] ID of the property
- Returns:
Non-negative on success/Negative on failure
-
perr_t PDC_prop_end()¶
PDC container and object property finalize.
- Returns:
Non-negative on success/Negative on failure
-
struct _pdc_cont_prop *PDCcont_prop_get_info(pdcid_t cont_prop)¶
Get container property infomation.
- Parameters:
prop_id – [IN] ID of the property
- Returns:
Pointer to _pdc_cont_prop struct/Null on failure
-
struct pdc_obj_prop *PDCobj_prop_get_info(pdcid_t obj_prop)¶
Get object property infomation.
- Parameters:
prop_id – [IN] ID of the object property
- Returns:
Pointer to pdc_obj_prop struct/Null on failure
-
struct _pdc_obj_prop *PDC_obj_prop_get_info(pdcid_t obj_prop)¶
Get object property infomation.
- Parameters:
prop_id – [IN] ID of the object property
- Returns:
Pointer to _pdc_obj_prop struct/Null on failure
-
perr_t PDC_obj_prop_free(struct _pdc_obj_prop *cp)¶
- Parameters:
cp – [IN] Object property
- Returns:
Non-negative on success/Negative on failure