Download HiLA User Guide

Transcript
HiLA User Guide
4.5
7
Job
A specialization of the generic Task is a Job, which has an exit code, outcome files, a working
directory etc. Unlike ordinary Tasks, Jobs have a Storage representing the Jobs’ working
directory, which can be browsed like any other Storage.
4.6
Reservation
Starting with version 2.2, Sites implement the Reservable interface, which allows for
creating reservations based on ResourceDescriptions. Since not all Sites or even
Grid middleware support this, it is very likely that calling the reserve method throws a
HiLANotImplementedException or HiLANotSupportedException.
Jobs can be run inside Reservations.
4.7
File
File locations are structured like
<scheme>:/sites/<site-name>/storages/<storage-name>/files/<file-name>.
Again, as Tasks have associated Storages as well, and these Storages also contain Files, an
alternative structure of a File’s location is
<scheme>:/sites/<site-name>/tasks/<task-name>/wd/files/<file-name>.
Example File Locations for the UNICORE 6 implementation look like the following:
unicore6:/sites/Alpha-Site/storages/home/files/.bashrc and
unicore6:/sites/Alpha-Site/tasks/\
79258434-f295-11dd-b58a-001f160cb28c/wd/files/stdout.
5
Development
If you would like to develop using the HiLA API, you will most likely start with the Location of a Resource serving as an entry point into the Resource hierarchy of your problem
domain. It could be something as simple as a pure scheme name appended with »:/«, such as
unicore6:/.
In code, this would look something like this:
Location loc = new Location("unicore6:/sites/DEMO-SITE_201004261103 ←");
if(loc.isLocationOfType(Site.class)) {
Site site = (Site) loc.locate();
// do something with that site
}