com.parabon.client
Class TaskSpec.SchedulingConstraints

java.lang.Object
  extended by com.parabon.client.TaskSpec.SchedulingConstraints
Enclosing class:
TaskSpec

public static class TaskSpec.SchedulingConstraints
extends java.lang.Object


Constructor Summary
TaskSpec.SchedulingConstraints()
           
 
Method Summary
 void addExternalPackage(TaskSpec.ExternalPackage externalPackage)
          Add an "external package" constraint, specifying that a given external package (dataset, library, application, etc) with a version matching that specified (if any) exists on the engine on which the task is run and is discoverable by that engine.
 void addNodeGroup(java.lang.String group)
          Add a "node group" constraint, specifying that a given task can execute on engines participating the the specified node group.
 void addRequiredRuntimeCapability(java.lang.String name, java.lang.String value)
          Add to the "required runtime capabilities" constraint.
 void clear()
           
 java.lang.Double getClusterInterconnectSpeed()
          Get the "cluster interconnect speed" constraint (in kbps or kilobits per second).
 java.lang.Integer getClusterNodes()
          Get the "allocated cluster nodes" constraint.
 java.lang.Double getConnectionSpeed()
          Get the "connection speed" constraint (in kbps or kilobits per second).
 java.lang.Integer getCPUCores()
          Get the "allocated CPU cores" constraint.
 java.lang.Double getCPUSpeed()
          Get the "CPU speed" constraint (in MHz).
 java.lang.String getCPUType()
          Get the "CPU type" constraint, as a regular expression.
 java.lang.Boolean getDedicatedMode()
          Get the "dedicated mode" constraint.
 java.lang.Double getDisk()
          Get the "minimum secondary storage" constraint, in megabytes.
 java.util.Set<TaskSpec.ExternalPackage> getExternalPackages()
          Retrieve the set of "external package" constraints currently specified.
 java.lang.Double getMemory()
          Get the "minimum memory" constraint, in megabytes.
 java.lang.Integer getNetworkType()
          Get the "network type" constraint.
 java.util.Set<java.lang.String> getNodeGroups()
          Get the "node groups" constraint.
 java.lang.String getNodeId()
          Get the "node id" constraint.
 java.lang.String getOSArch()
          Get the "operating system architecture" constraint, as a regular expression.
 java.lang.String getOSName()
          Get the "operating system" constraint, as a regular expression.
 java.lang.String getOSVersion()
          Get the "operating system version" constraint, as a regular expression.
 java.util.Map<java.lang.String,java.lang.String> getRequiredRuntimeCapabilities()
          Get the "required runtime capabilities" constraint.
 void set(TaskSpec.SchedulingConstraints other)
           
 void setClusterInterconnectSpeed(java.lang.Double value)
          Set the "cluster interconnect speed" constraint (in kbps or kilobits per second), specifying the minimum point-to-point communications speed (theoretical or measured) which must be available to communicate between cluster nodes.
 void setClusterNodes(java.lang.Integer value)
          Set the "allocated cluster nodes" constraint, specifying the minimum number of cluster nodes (not including the head node) which must be allocated to run a given task.
 void setConnectionSpeed(java.lang.Double value)
          Set the "connection speed" constraint (in kbps or kilobits per second), specifying the minimum point-to-point communications speed (theoretical or measured) between a given compute node and the Frontier server.
 void setCPUCores(java.lang.Integer value)
          Set the "allocated CPU cores" constraint, specifying the minimum number of real or virtual parallel processing cores which must be allocated to running a task on a given engine.
 void setCPUSpeed(java.lang.Double value)
          Set the "CPU speed" constraint (in MHz), specifying the minimum core clock speed of each core of a processor used to run a given task.
 void setCPUType(java.lang.String value)
          Set the "CPU type" constraint as a regular expression which must match the CPU descriptor string provided by a given engine.
 void setDedicatedMode(java.lang.Boolean value)
          Set the "dedicated mode" constraint, which specifies that the engine must be running as a dedicated Frontier engine.
 void setDisk(java.lang.Double value)
          Set the "minimum secondary storage allocated to a task" constraint, in megabytes.
 void setMemory(java.lang.Double value)
          Set the "minimum memory allocated to a task" constraint, in megabytes.
 void setNetworkType(TaskSpec.NetworkTypeConstraint value)
          Set the "network type" constraint, which requires the engine to support the supplied network type.
 void setNodeId(java.lang.String nodeId)
          Set the "node id" constraint specifying a single node in that can run the current task.
 void setOSArch(java.lang.String value)
          Set the "operating system architecture" constraint, as a regular expression.
 void setOSName(java.lang.String value)
          Set the "operating system" constraint, as a regular expression.
 void setOSVersion(java.lang.String value)
          Set the "operating system version" constraint, as a regular expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskSpec.SchedulingConstraints

public TaskSpec.SchedulingConstraints()
Method Detail

clear

public void clear()

set

public void set(TaskSpec.SchedulingConstraints other)

getMemory

public java.lang.Double getMemory()
Get the "minimum memory" constraint, in megabytes.

Returns:
The value of the "minimum memory" constraint (specified in megabytes), or null if no constraint is specified.
See Also:
setMemory(Double)

setMemory

public void setMemory(java.lang.Double value)
Set the "minimum memory allocated to a task" constraint, in megabytes. This amount of memory includes that required to instantiate the runtime environment and load any necessary classes.

Parameters:
value - The value of the "minimum memory" constraint, or null if no such constraint is to be specified.
See Also:
getMemory()

getDisk

public java.lang.Double getDisk()
Get the "minimum secondary storage" constraint, in megabytes.

Returns:
The value of the "minimum secondary storage" constraint (specified in megabytes), or null if no constraint is specified.
See Also:
setDisk(Double)

setDisk

public void setDisk(java.lang.Double value)
Set the "minimum secondary storage allocated to a task" constraint, in megabytes.

Parameters:
value - The value of the "minimum secondary storage" constraint, or null if no such constraint is to be specified.
See Also:
getDisk()

getOSName

public java.lang.String getOSName()
Get the "operating system" constraint, as a regular expression.

Returns:
The value of the "operating system" constraint (as a regular expression), or null if no constraint is specified.
See Also:
setOSName(String)

setOSName

public void setOSName(java.lang.String value)
Set the "operating system" constraint, as a regular expression.

Parameters:
value - The value of the "operating system" constraint, or null if no such constraint is to be specified.
See Also:
getOSName()

getOSVersion

public java.lang.String getOSVersion()
Get the "operating system version" constraint, as a regular expression.

Returns:
The value of the "operating system version" constraint (as a regular expression), or null if no constraint is specified.
See Also:
setOSVersion(String)

setOSVersion

public void setOSVersion(java.lang.String value)
Set the "operating system version" constraint, as a regular expression.

Parameters:
value - The value of the "operating system version" constraint, or null if no such constraint is to be specified.
See Also:
getOSVersion()

getOSArch

public java.lang.String getOSArch()
Get the "operating system architecture" constraint, as a regular expression.

Returns:
The value of the "operating system architecture" constraint (as a regular expression), or null if no constraint is specified.
See Also:
setOSArch(String)

setOSArch

public void setOSArch(java.lang.String value)
Set the "operating system architecture" constraint, as a regular expression.

Parameters:
value - The value of the "operating system architecture" constraint, or null if no such constraint is to be specified.
See Also:
getOSVersion()

addExternalPackage

public void addExternalPackage(TaskSpec.ExternalPackage externalPackage)
Add an "external package" constraint, specifying that a given external package (dataset, library, application, etc) with a version matching that specified (if any) exists on the engine on which the task is run and is discoverable by that engine. Note that this constraint does not guarantee that the specified external package is accessible by the task; this depends also on the security model in place for a given task on a given engine.

See Also:
TaskSpec.ExternalPackage

getExternalPackages

public java.util.Set<TaskSpec.ExternalPackage> getExternalPackages()
Retrieve the set of "external package" constraints currently specified. The returned set should not be modified. The behaviour of the returned Set instance is undefined after the underlying set of external packages is further modified.

See Also:
TaskSpec.ExternalPackage, addExternalPackage(com.parabon.client.TaskSpec.ExternalPackage)

getCPUType

public java.lang.String getCPUType()
Get the "CPU type" constraint, as a regular expression.

Returns:
The value of the "CPU type" constraint (as a regular expression), or null if no constraint is specified.
See Also:
setCPUType(String)

setCPUType

public void setCPUType(java.lang.String value)
Set the "CPU type" constraint as a regular expression which must match the CPU descriptor string provided by a given engine. This string includes CPU vendor, model, instruction set architecture, and extended instruction sets available in a vendor-dependent fashion.

Parameters:
value - The value of the "CPU type" constraint (as a regular expression), or null if no such constraint is to be specified.
See Also:
getCPUType()

getCPUSpeed

public java.lang.Double getCPUSpeed()
Get the "CPU speed" constraint (in MHz).

Returns:
The value of the "CPU speed" constraint (in MHz), or null if no constraint is specified.
See Also:
setCPUSpeed(Double)

setCPUSpeed

public void setCPUSpeed(java.lang.Double value)
Set the "CPU speed" constraint (in MHz), specifying the minimum core clock speed of each core of a processor used to run a given task.

Parameters:
value - The value of the "CPU speed" constraint (in MHz), or null if no constraint is to be specified.
See Also:
getCPUSpeed()

getCPUCores

public java.lang.Integer getCPUCores()
Get the "allocated CPU cores" constraint.

Returns:
The value of the "allocated CPU cores" constraint, or null if no constraint is specified.
See Also:
setCPUCores(Integer)

setCPUCores

public void setCPUCores(java.lang.Integer value)
Set the "allocated CPU cores" constraint, specifying the minimum number of real or virtual parallel processing cores which must be allocated to running a task on a given engine.

Parameters:
value - The value of the "allocated CPU cores" constraint, or null if no constraint is specified.
See Also:
getCPUCores()

getClusterNodes

public java.lang.Integer getClusterNodes()
Get the "allocated cluster nodes" constraint.

Returns:
The value of the "allocated cluster nodes" constraint, or null if no constraint is specified.
See Also:
setClusterNodes(Integer)

setClusterNodes

public void setClusterNodes(java.lang.Integer value)
Set the "allocated cluster nodes" constraint, specifying the minimum number of cluster nodes (not including the head node) which must be allocated to run a given task. All such cluster nodes must obey all applicable scheduling constraints specified here.

Parameters:
value - The value of the "allocated cluster nodes" constraint, or null if no constraint is specified.
See Also:
getClusterNodes()

getClusterInterconnectSpeed

public java.lang.Double getClusterInterconnectSpeed()
Get the "cluster interconnect speed" constraint (in kbps or kilobits per second).

Returns:
The value of the "cluster interconnect speed" constraint (in kbps or kilobits per second), or null if no constraint is specified.
See Also:
setClusterInterconnectSpeed(Double)

setClusterInterconnectSpeed

public void setClusterInterconnectSpeed(java.lang.Double value)
Set the "cluster interconnect speed" constraint (in kbps or kilobits per second), specifying the minimum point-to-point communications speed (theoretical or measured) which must be available to communicate between cluster nodes. This constraint is generally only applicable when the "cluster nodes" constraint is set to 2 or greater, otherwise the task will generally not be run on a compute cluster and this value is undefined.

Parameters:
value - The value of the "cluster interconnect speed" constraint (in kbps or kilobits per second), or null if no constraint is specified.
See Also:
getClusterInterconnectSpeed()

getConnectionSpeed

public java.lang.Double getConnectionSpeed()
Get the "connection speed" constraint (in kbps or kilobits per second).

Returns:
The value of the "connection speed" constraint (in kbps or kilobits per second), or null if no constraint is specified.
See Also:
setConnectionSpeed(Double)

setConnectionSpeed

public void setConnectionSpeed(java.lang.Double value)
Set the "connection speed" constraint (in kbps or kilobits per second), specifying the minimum point-to-point communications speed (theoretical or measured) between a given compute node and the Frontier server.

Parameters:
value - The value of the "connection speed" constraint (in kbps or kilobits per second), or null if no constraint is specified.
See Also:
getConnectionSpeed()

getNodeId

public java.lang.String getNodeId()
Get the "node id" constraint.

Returns:
The value of the "node id" constraint or null if no constraint is specified.
See Also:
setNodeId(String)

setNodeId

public void setNodeId(java.lang.String nodeId)
Set the "node id" constraint specifying a single node in that can run the current task.

Parameters:
nodeId - The value of the "node id" constraint or null if no constraint is specified.
See Also:
getNodeId()

getNodeGroups

public java.util.Set<java.lang.String> getNodeGroups()
Get the "node groups" constraint.

Returns:
A collection of "node groups" that make up the constraint or and empty collection if no constraint is specified.
See Also:
addNodeGroup(String)

addNodeGroup

public void addNodeGroup(java.lang.String group)
Add a "node group" constraint, specifying that a given task can execute on engines participating the the specified node group.

See Also:
getNodeGroups()

getDedicatedMode

public java.lang.Boolean getDedicatedMode()
Get the "dedicated mode" constraint.

Returns:
The value of the "dedicated mode" constraint, or null if no constraint is specified.
See Also:
setDedicatedMode(Boolean)

setDedicatedMode

public void setDedicatedMode(java.lang.Boolean value)
Set the "dedicated mode" constraint, which specifies that the engine must be running as a dedicated Frontier engine. Engines of this type run continously and will not be interrupted by user events.

Parameters:
value - The value of the "dedicated mode" constraint, or null if no constraint is specified.
See Also:
getDedicatedMode()

getNetworkType

public java.lang.Integer getNetworkType()
Get the "network type" constraint.

Returns:
The value of the "network type" constraint, or null if no constraint is specified.
See Also:
setNetworkType(TaskSpec.NetworkTypeConstraint value)

setNetworkType

public void setNetworkType(TaskSpec.NetworkTypeConstraint value)
Set the "network type" constraint, which requires the engine to support the supplied network type.

Parameters:
value - The value of the "network type" constraint, or null if no constraint is specified.
See Also:
getNetworkType()

getRequiredRuntimeCapabilities

public java.util.Map<java.lang.String,java.lang.String> getRequiredRuntimeCapabilities()
Get the "required runtime capabilities" constraint.

Returns:
The map of the "required runtime capabilities" constraint.
See Also:
addRequiredRuntimeCapability(String name, String value)

addRequiredRuntimeCapability

public void addRequiredRuntimeCapability(java.lang.String name,
                                         java.lang.String value)
Add to the "required runtime capabilities" constraint. The engine's runtime must support the specified constraint in order for the task to be scheduled to an engine.

Parameters:
name - The name of the capability
value - The value of the capability.
See Also:
getRequiredRuntimeCapabilities()