ESDM
Middleware for Earth System Data
|
#include <esdm-datatypes-internal.h>
Data Fields | |
int(* | finalize )(esdm_backend_t *b) |
int(* | performance_estimate )(esdm_backend_t *b, esdm_fragment_t *fragment, float *out_time) |
float(* | estimate_throughput )(esdm_backend_t *b) |
int(* | fragment_create )(esdm_backend_t *b, esdm_fragment_t *fragment) |
int(* | fragment_retrieve )(esdm_backend_t *b, esdm_fragment_t *fragment) |
int(* | fragment_update )(esdm_backend_t *b, esdm_fragment_t *fragment) |
int(* | fragment_delete )(esdm_backend_t *b, esdm_fragment_t *fragment) |
int(* | fragment_metadata_create )(esdm_backend_t *b, esdm_fragment_t *fragment, smd_string_stream_t *stream) |
void *(* | fragment_metadata_load )(esdm_backend_t *b, esdm_fragment_t *fragment, json_t *metadata) |
int(* | fragment_metadata_free )(esdm_backend_t *b, void *options) |
int(* | mkfs )(esdm_backend_t *b, int format_flags) |
int(* | fsck )(esdm_backend_t *b) |
int(* | fragment_write_stream_blocksize )(esdm_backend_t *b, estream_write_t *state, void *cur_buf, size_t cur_offset, uint64_t cur_size) |
finalize: before ESDM exits, it will call the finalize function for every module
performance_estimate:
Notes:
int(* esdm_backend_t_callbacks_t::fragment_write_stream_blocksize) (esdm_backend_t *b, estream_write_t *state, void *cur_buf, size_t cur_offset, uint64_t cur_size) |
Write a fragment by streaming it piecemeal.
[in] | backend | the backend object |
[in,out] | state | the caller sets the fragment member, and then reuses the state object for further calls unchanged |
[in] | cur_buf | pointer to the first byte that is to be written by this call |
[in] | cur_offset | logical offset to the first byte in cur_buf within the fragment, this is used to select whether the stream is being set up, streamed to, or torn down |
[in] | cur_size | count of bytes to be streamed by this call |
For proper operation, cur_offset
must be 0
on the first call, and cur_offset + cur_size
must be equal the size of the fragment on the last call. Intermediate call must satisfy neither condition.
the expected blocksize for streaming is stored inside the backend configuration