SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Functions
SIONlib API Key Value
Collaboration diagram for SIONlib API Key Value:

Functions

size_t sion_fwrite_key (const void *data, uint64_t key, size_t size, size_t nitems, int sid)
 Writes data for key. More...
 
size_t sion_fread_key (void *data, uint64_t key, size_t size, size_t nitems, int sid)
 Read data for key. More...
 
int sion_key_full_scan (int sid)
 Performs a full scan of all meta data in current file. More...
 
int sion_fread_key_iterator_reset (int sid)
 Resets key iterator. More...
 
int sion_fread_key_iterator_next (int sid, uint64_t *keyptr, size_t *sizeptr)
 Forward to next key. More...
 
int sion_seek_key (int sid, uint64_t key, int entrynum, sion_int64 posinentry)
 Seek to position in key. More...
 
int sion_get_keyval_mode (int sid)
 Return selected mode for key value. More...
 
char * sion_keyval_type_to_str (int type)
 Returns key value mode as string. More...
 
int sion_key_list_iterator_reset (int sid)
 Resets key iterator. More...
 
int sion_key_list_iterator_next (int sid, uint64_t *keyptr)
 Forward to next key. More...
 
int sion_key_get_stat (int sid, uint64_t key, sion_key_stat_t *keystatptr)
 get statistics about key More...
 

Detailed Description

API doc for key value feature of SIONlib.

Function Documentation

◆ sion_fread_key()

size_t sion_fread_key ( void *  data,
uint64_t  key,
size_t  size,
size_t  nitems,
int  sid 
)

Read data for key.

Reads data from sion file associated to key. This function uses the diffenent implementations of which one is chosen with the open call.

Parameters
[out]databuffer to be read into
[in]keykey associated to the data
[in]sizesize of single item
[in]nitemsnumber of items
[in]sidsion file handle
Returns
number of successfully read items

Definition at line 202 of file sion_keyvalue.c.

◆ sion_fread_key_iterator_next()

int sion_fread_key_iterator_next ( int  sid,
uint64_t *  keyptr,
size_t *  sizeptr 
)

Forward to next key.

Parameters
[in]sidsion file handle
[out]keyptrfilled with next key
[out]sizeptrfilled with next size
Returns
SION_SUCCESS on success

Definition at line 326 of file sion_keyvalue.c.

◆ sion_fread_key_iterator_reset()

int sion_fread_key_iterator_reset ( int  sid)

Resets key iterator.

Parameters
[in]sidsion file handle
Returns
SION_SUCCESS on success

Definition at line 290 of file sion_keyvalue.c.

◆ sion_fwrite_key()

size_t sion_fwrite_key ( const void *  data,
uint64_t  key,
size_t  size,
size_t  nitems,
int  sid 
)

Writes data for key.

Writes data to sion file associating it to key. This function uses the diffenent implementations of which one is chosen with the open call.

Parameters
[in]datadata to be written
[in]keykey associated to the data
[in]sizesize of single item
[in]nitemsnumber of items
[in]sidsion file handle
Returns
number of successfully written items

Definition at line 143 of file sion_keyvalue.c.

◆ sion_get_keyval_mode()

int sion_get_keyval_mode ( int  sid)

Return selected mode for key value.

Parameters
[in]sidsion file handle
Returns
keyval mode, e.g. SION_KEYVAL_INLINE

Definition at line 406 of file sion_keyvalue.c.

References SION_KEYVAL_UNKNOWN.

◆ sion_key_full_scan()

int sion_key_full_scan ( int  sid)

Performs a full scan of all meta data in current file.

Parameters
[in]sidsion file handle
Returns
SION_SUCCESS on success

Definition at line 254 of file sion_keyvalue.c.

◆ sion_key_get_stat()

int sion_key_get_stat ( int  sid,
uint64_t  key,
sion_key_stat_t keystatptr 
)

get statistics about key

Parameters
[in]sidsion file handle
[in]keykey
[out]keystatptrdata structure which will be filled
Returns
SION_SUCCESS on success

Definition at line 532 of file sion_keyvalue.c.

◆ sion_key_list_iterator_next()

int sion_key_list_iterator_next ( int  sid,
uint64_t *  keyptr 
)

Forward to next key.

Parameters
[in]sidsion file handle
[out]keyptrfilled with next key
Returns
SION_SUCCESS on success

Definition at line 496 of file sion_keyvalue.c.

◆ sion_key_list_iterator_reset()

int sion_key_list_iterator_reset ( int  sid)

Resets key iterator.

Parameters
[in]sidsion file handle
Returns
SION_SUCCESS on success

Definition at line 461 of file sion_keyvalue.c.

◆ sion_keyval_type_to_str()

char* sion_keyval_type_to_str ( int  type)

Returns key value mode as string.

Parameters
[in]typemode to be converted
Returns
string representation of mode

Definition at line 438 of file sion_keyvalue.c.

◆ sion_seek_key()

int sion_seek_key ( int  sid,
uint64_t  key,
int  entrynum,
sion_int64  posinentry 
)

Seek to position in key.

Parameters
[in]sidsion file handle
[in]keykey to seek in
[in]entrynumnth occurrence of key or SION_ABSOLUTE_POS for absolute position
[in]posinentryposition inside of entry
Returns
SION_SUCCESS on success

Definition at line 365 of file sion_keyvalue.c.