pilot.impl.pilotcompute_manager.PilotCompute

Package pilot :: Package impl :: Module pilotcompute_manager :: Class PilotCompute |

# Class PilotCompute

source code

Pilot Compute (PC).

This is the object that is returned by the PilotComputeService when a new PilotCompute is created based on a PilotComputeDescription.

The PilotCompute object can be used by the application to keep track of active pilots.

A ComputePilot has state, can be queried and cancelled.

Properties:

- state: The state of the pilot.
- id: The id may be 'None' if the Pilot is not yet in Running state. The returned ID can be used to connect to the CP instance later on, for example from within a different application instance. type: string (url)
- pilot_compute_description: The PilotComputeDescription used to create this pilot.

Instance Methods
__init__(self, pilot_compute_service=None, bigjob_object=None, pilot_compute_description=None, pilot_url=None) Create/reconnect to a Pilot Compute. | source code
cancel(self) Terminates the pilot | source code
get_state(self) Returns the state of the pilot | source code
wait(self) Wait until Pilot Compute to enter a final state (Done, Cancel or Failed) | source code
list_compute_units(self) list managed ComputeUnits. | source code
get_url(self) Get unique URL referencing the Pilot Compute This URL can be used to reconnect to the Pilot Compute | source code
get_free_nodes(self) Returns the number of free slots available within the pilot | source code
get_details(self) returns a dict that contains the details of the Pilot Compute, | source code
submit_compute_unit(self, compute_unit_description) Submit a CU to this pilot. | source code
__repr__(self) repr(x) | source code
reinitialize(self, pilotjob_description) Re-Initialize the PilotCompute to the (new) PilotComputeDescription. (Inherited from pilot.api.compute.api.PilotCompute) | source code
set_callback(self, member, cb) Set a callback function for a member. (Inherited from pilot.api.compute.api.PilotCompute) | source code
unset_callback(self, member) Unset a callback function from a member (Inherited from pilot.api.compute.api.PilotCompute) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
| callback (Inherited from pilot.api.compute.api.PilotCompute)
| context (Inherited from pilot.api.compute.api.PilotCompute)
| description (Inherited from pilot.api.compute.api.PilotCompute)
| id (Inherited from pilot.api.compute.api.PilotCompute)
| pj_type (Inherited from pilot.api.compute.api.PilotCompute)
| rm (Inherited from pilot.api.compute.api.PilotCompute)
| state (Inherited from pilot.api.compute.api.PilotCompute)
| state_detail (Inherited from pilot.api.compute.api.PilotCompute)
| wall_time_left (Inherited from pilot.api.compute.api.PilotCompute)
Inherited from `object`: `__class__`

Method Details

### __init__(self, pilot_compute_service=None, bigjob_object=None, pilot_compute_description=None, pilot_url=None) (Constructor) | source code
Create/reconnect to a Pilot Compute. Keyword arguments: pilot_url -- restore from cp_id The implementation will attempt to reconnect to the PC instance referenced by the pilot_url. Overrides: object.__init__

### cancel(self) | source code
Terminates the pilot Overrides: api.compute.api.PilotCompute.cancel

### get_state(self) | source code
Returns the state of the pilot Overrides: api.compute.api.PilotCompute.get_state

### wait(self) | source code
Wait until Pilot Compute to enter a final state (Done, Cancel or Failed) It is not an error to call wait() in a final state -- the call simply returns immediately.

### list_compute_units(self) | source code
list managed ComputeUnits. Return value: A list of ComputeUnit IDs The returned list can include units which have been submitted to this pilot.

### get_details(self) | source code
returns a dict that contains the details of the Pilot Compute, job state description ...

### submit_compute_unit(self, compute_unit_description) | source code
Submit a CU to this pilot. Parameters: `compute_unit_description` - The ComputeUnitDescription or dictionary describing the compute task Returns: ComputeUnit object The CUD is (possibly translated and) passed on to the PDS scheduler, which will attempt to instantiate the described workload process on the managed set of Pilot Computes. On success, the returned CU is in Pending state (or moved into any state downstream from Pending). The call will will honor all attributes set on the CUD. Attributes which are not explicitly set are interpreted as having default values (see documentation of CUD), or, where default values are not specified, are ignored.

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)