|

 |

| 
|
| |
|
|
Main Page Modules Data Structures File List Data Fields Globals
The LoRS API for LorsDepotPool
|
Data Structures |
| struct | __LorsDepotPool |
Functions |
| int | lorsGetDepotPool (LorsDepotPool **dp, char *lbone_server, int lbone_server_port, IBP_depot *depots, int min_unique_depots, char *location, ulong_t storage_size, int storage_type, time_t duration, int nthreads, int timeout, int opts) |
| | Create a collection of IBP depots from the LBone or a user supplied list.
|
| int | lorsUpdateDepotPool (LorsExnode *exnode, LorsDepotPool **ret_dpp, char *lbone_server, int lbone_server_port, char *location, int nthreads, int timeout, int opts) |
| int | lorsFreeDepotPool (LorsDepotPool *dpp) |
Function Documentation
| int lorsGetDepotPool |
( |
LorsDepotPool ** |
dp, |
|
|
char * |
lbone_server, |
|
|
int |
lbone_server_port, |
|
|
IBP_depot * |
depots, |
|
|
int |
min_unique_depots, |
|
|
char * |
location, |
|
|
ulong_t |
storage_size, |
|
|
int |
storage_type, |
|
|
time_t |
duration, |
|
|
int |
nthreads, |
|
|
int |
timeout, |
|
|
int |
opts |
|
) |
|
|
|
|
Create a collection of IBP depots from the LBone or a user supplied list.
lorsGetDepotPool acts as a wrapper of various LBone calls. It acts as a means for obtaining a collection of IBP depots from which the other LoRS procedures will draw. Optionally, a user may provide a filename, which will replace the lbone call to getDepots. - Parameters:
-
| dp |
A LorsDepotPool is returned after having called either lbone_getDepots() or reading the specified list. |
| lbone_server |
The hostname of a specific lboneserver. |
| lbone_server_port |
The corresponding port for given lboneserver. |
| depots |
If not NULL, lorsGetLorsDepotPool() will attempt to get all IBP depots from this list. Convenient for testing or requiring particular depots not listed in the lbone. |
| min_unique_depots |
The lbone has a limited number of depots. For your particular application you may need more than are available in a particular region, and without a maximum, the lbone request might return depots from other regions to satisfy the request. min_unique_depots allows a user to set the upper bound for the number of depots returned. For best striping, more depots will be better. For best performance, fewer depots may be better. But not too few.. |
| location |
The lbone accepts location hints to specify a region. Lbone API |
| storage_size |
storage_size is measured in Megabytes. Likely, you will need a minimum per-depot storage capacity. For example, if your file were 20GB, and you wanted to stripe it across 5 locations, storage_size would equal 4GB/1MB. |
| storage_type |
IBP allows either IBP_HARD or IBP_SOFT allocations. SOFT are more readily available, while HARD have stronger guarantees about reliability. IBP API |
| duration |
Depots can also specify maximum lease time for allocations. This gives a minimum that you are willing to accept for your depots. |
| nthreads |
The maximum number of threads to utilize while performing this operation. Not fully supported by lbone_checkDepots(). |
| timeout |
Because this is a network operation, a timeout is provided to assure that the call will eventually return, even on failure. |
| opts |
LORS_CHECKDEPOTS - Call lbone_checkDepots() on first depot list. LORS_SERVER_AND_LIST - Read depots from given list as well as from lbone_server to meet min_unique_depots. SORT_BY_PROXIMITY SORT_BY_BANDWIDTH SORT_BY_OTHERS
|
- Returns:
-
There are various error conditions. See list of all possible errors The LoRS Error List.
|
| int lorsUpdateDepotPool |
( |
LorsExnode * |
exnode, |
|
|
LorsDepotPool ** |
ret_dpp, |
|
|
char * |
lbone_server, |
|
|
int |
lbone_server_port, |
|
|
char * |
location, |
|
|
int |
nthreads, |
|
|
int |
timeout, |
|
|
int |
opts |
|
) |
|
|
|
|
This function is necessary until there is a more appropriately named lorsCreateDepotPoolFromExnode(). As deserialized, the LorsExnode does not include the LorsDepotPool structure. This funciton creates one and updates it with the given proximity as returned by the lbone.
This functionality should be replaced with a combination of functions lorsGetDepotPoolFromExnode and lorsUpdateDepotPoolFromResolution(); - Parameters:
-
| exnode |
A recently deserialized exnode. |
| ret_dpp |
A pointer into which the newly created LorsDepotPool is returned. |
| lbone_server |
An lbone server which can return proximity information relative to the given location. |
| lbone_server_port |
The lbone server port. |
| location |
A location hint relative to which the lbone returns stuff. |
| nthreads |
The maximum number of threads to use. |
| timeout |
Spend no longer than this. |
| opts |
?? |
- Returns:
-
There are various error conditions. See list of all possible errors The LoRS Error List.
|
|
|
Release the resources consumed by this structure. - Parameters:
-
- Returns:
-
There are various error conditions. See list of all possible errors The LoRS Error List.
|
|
 |
|
|
|