com.ace.moab.api.jobs
Class JobRequirement

java.lang.Object
  extended by com.ace.moab.api.jobs.JobRequirement
All Implemented Interfaces:
java.io.Serializable

public class JobRequirement
extends java.lang.Object
implements java.io.Serializable

This class defines all the requirements a job needs in order to run. Multiple job requirement objects can be used to when determining if resources are sufficient to use for running a job.

See Also:
Serialized Form

Constructor Summary
JobRequirement()
           
 
Method Summary
 JobAllocatedNodes getAllocatedNodes()
           Returns the set of nodes that the requirement is allocated to.
 java.lang.String getAllocatedPartition()
           Returns the partition the requirement asks for.
 NodeAccessPolicy getNodeAccessPolicy()
           Returns the node access policy this requirement asks for.
 NodeSet getNodeSet()
           Returns the node set that the requirement asks for.
 java.util.Set<java.lang.String> getPreferredNodeFeatures()
           Returns the list of node features the requirement prefers.
 java.lang.String getRequiredArchitecture()
           Returns the required architecture.
 java.lang.String getRequiredClass()
           Returns the required class/queue.
 int getRequiredDiskPerTask()
           Returns the required disk in MB per task.
 int getRequiredMemoryPerTask()
           Returns the required memory in MB per task.
 java.lang.String getRequiredNetwork()
           Returns the required network.
 java.lang.Integer getRequiredNodeCountMinimum()
           Returns the minimum number of nodes called for by the requirement.
 java.lang.Integer getRequiredNodeDisk()
           Returns the required disk space in MB across all nodes.
 java.util.Set<java.lang.String> getRequiredNodeFeatures()
           Returns the set of node features the requirement asks for.
 java.lang.Integer getRequiredNodeMemory()
           Returns the required memory in MB across all nodes.
 java.lang.Integer getRequiredNodeProcessors()
           Returns the required processors needed on a per node basis.
 java.lang.Integer getRequiredNodeSwap()
           Returns the required swap in MB across all nodes.
 java.lang.String getRequiredOS()
           
 java.lang.String getRequiredPartition()
           Returns the required partition for the requirement.
 java.lang.Integer getRequiredProcessorCountMinimum()
           Returns the minimum number of processors called for by the requirement.
 int getRequiredProcessorsPerTask()
           Returns the required processors per task.
 int getRequiredSwapPerTask()
           Returns the required swap in MB per task.
 java.lang.Integer getTasksPerNode()
           Returns the number of tasks to map to each node.
 void setAllocatedNodes(java.util.Set<JobAllocatedNode> allocatedNodes)
           Sets the set of nodes the requirement is allocated to.
 void setAllocatedPartition(java.lang.String allocatedPartition)
           Sets the partition the requirement asks for.
 void setGenericResource(java.lang.String name, java.lang.Integer amount)
          Sets a generic resource requirement (This node may have many).
 void setNodeAccessPolicy(NodeAccessPolicy nodeAccessPolicy)
           Sets the node access policy the requirement asks for.
 void setNodeSet(NodeSet nodeSet)
           Sets the node set that the requirement asks for.
 void setPreferredNodeFeatures(java.util.Set<java.lang.String> preferredNodeFeatures)
           Sets the list of node features the requirement prefers.
 void setRequiredArchitecture(java.lang.String requiredArchitecture)
           Sets the required architecture.
 void setRequiredClass(java.lang.String requiredClass)
           Sets the required class/queue.
 void setRequiredDiskPerTask(int requiredDiskPerTask)
          Sets the required disk in MB per task.
 void setRequiredMemoryPerTask(int requiredMemoryPerTask)
          Sets the required memory in MB per task.
 void setRequiredNetwork(java.lang.String requiredNetwork)
           Sets the required network.
 void setRequiredNodeCountMinimum(java.lang.Integer requiredNodeCountMinimum)
           Sets the minimum number of nodes called for by the requirement.
 void setRequiredNodeDisk(java.lang.Integer requiredNodeDisk)
           Sets the required disk space in MB across all nodes.
 void setRequiredNodeFeatures(java.util.Set<java.lang.String> nodeFeatures)
           Sets the list of node features the requirement asks for.
 void setRequiredNodeMemory(java.lang.Integer requiredNodeMemory)
           Sets the required memory in MB across all nodes.
 void setRequiredNodeProcessors(java.lang.Integer requiredNodeProcessors)
           Sets the required processors needed on a per node basis.
 void setRequiredNodeSwap(java.lang.Integer requiredNodeSwap)
           Sets the required swap in MB across all nodes.
 void setRequiredOS(java.lang.String requiredOS)
           Sets the required operating system on each node.
 void setRequiredPartition(java.lang.String requiredPartition)
          Sets the required partition/cluster for the requirement.
 void setRequiredProcessorCountMinimum(java.lang.Integer requireProcessorCountMinimum)
           Sets the minimum number of processors called for by the requirement.
 void setRequiredProcessorsPerTask(int requiredProcessorsPerTask)
          Sets the required processors per task.
 void setRequiredSwapPerTask(int requiredSwapPerTask)
          Sets the required swap in MB per task.
 void setTasksPerNode(java.lang.Integer tasksPerNode)
           Sets the number of tasks to map to each node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobRequirement

public JobRequirement()
Method Detail

getAllocatedNodes

public JobAllocatedNodes getAllocatedNodes()

Returns the set of nodes that the requirement is allocated to.

Cannot be null.

Returns:
the set of nodes that the requirement is allocated to.

getAllocatedPartition

public java.lang.String getAllocatedPartition()

Returns the partition the requirement asks for.

Can be null.

Returns:
the partition the requirement asks for. Can be null.

getNodeAccessPolicy

public NodeAccessPolicy getNodeAccessPolicy()

Returns the node access policy this requirement asks for.

Can be null.

Returns:
the node access policy this requirement asks for.

getNodeSet

public NodeSet getNodeSet()

Returns the node set that the requirement asks for.

Can be null.

Returns:
the node set that the requirement asks for.

getPreferredNodeFeatures

public java.util.Set<java.lang.String> getPreferredNodeFeatures()

Returns the list of node features the requirement prefers.

Can be null.

Returns:
the list of node features the requirement prefers.

getRequiredArchitecture

public java.lang.String getRequiredArchitecture()

Returns the required architecture.

Can be null.

Returns:
the required architecture.

getRequiredClass

public java.lang.String getRequiredClass()

Returns the required class/queue.

Can be null.

Returns:
the required class/queue.

getRequiredDiskPerTask

public int getRequiredDiskPerTask()

Returns the required disk in MB per task.

If 0 or less, disk is not part of the task requirement.

Returns:
the required disk in MB per task.

getRequiredMemoryPerTask

public int getRequiredMemoryPerTask()

Returns the required memory in MB per task.

If 0 or less, memory is not part of the task requirement.

Returns:
the required memory in MB per task.

getRequiredNetwork

public java.lang.String getRequiredNetwork()

Returns the required network.

Can be null.

Returns:
the required network.

getRequiredNodeCountMinimum

public java.lang.Integer getRequiredNodeCountMinimum()

Returns the minimum number of nodes called for by the requirement.

Can be null.

Returns:
the minimum number of nodes called for by the requirement.

getRequiredNodeDisk

public java.lang.Integer getRequiredNodeDisk()

Returns the required disk space in MB across all nodes.

Can be null.

Returns:
the required disk space in MB across all nodes.

getRequiredNodeFeatures

public java.util.Set<java.lang.String> getRequiredNodeFeatures()

Returns the set of node features the requirement asks for.

Can be null.

Returns:
the set of node features the requirement asks for.

getRequiredNodeMemory

public java.lang.Integer getRequiredNodeMemory()

Returns the required memory in MB across all nodes.

Can be null.

Returns:
the required memory in MB across all nodes.

getRequiredNodeProcessors

public java.lang.Integer getRequiredNodeProcessors()

Returns the required processors needed on a per node basis.

Can be null.

Returns:
the required processors needed on a per node basis.

getRequiredNodeSwap

public java.lang.Integer getRequiredNodeSwap()

Returns the required swap in MB across all nodes.

Can be null.

Returns:
the required swap in MB across all nodes.

getRequiredOS

public java.lang.String getRequiredOS()

getRequiredPartition

public java.lang.String getRequiredPartition()

Returns the required partition for the requirement.

Can be null.

Returns:
the required partition for the requirement.

getRequiredProcessorCountMinimum

public java.lang.Integer getRequiredProcessorCountMinimum()

Returns the minimum number of processors called for by the requirement.

Can be null.

Returns:
the minimum number of processors called for by the requirement.

getRequiredProcessorsPerTask

public int getRequiredProcessorsPerTask()

Returns the required processors per task.

If 0 or less, processors is not part of the requirement.

Returns:
the required processors per task.

getRequiredSwapPerTask

public int getRequiredSwapPerTask()

Returns the required swap in MB per task.

If 0 or less, swap is not part of the task requirement.

Returns:
the required processors per task.

getTasksPerNode

public java.lang.Integer getTasksPerNode()

Returns the number of tasks to map to each node.

Can be null.

Returns:
the number of tasks to map to each node.

setAllocatedNodes

public void setAllocatedNodes(java.util.Set<JobAllocatedNode> allocatedNodes)

Sets the set of nodes the requirement is allocated to.

Can be null.

Parameters:
allocatedNodes - the set of nodes the requirement is allocated to.

setAllocatedPartition

public void setAllocatedPartition(java.lang.String allocatedPartition)

Sets the partition the requirement asks for.

Can be null.

Parameters:
allocatedPartition - the partition the requirement asks for.

setNodeAccessPolicy

public void setNodeAccessPolicy(NodeAccessPolicy nodeAccessPolicy)

Sets the node access policy the requirement asks for.

Can be null.

Parameters:
nodeAccessPolicy - the node access policy the requirement asks for.

setNodeSet

public void setNodeSet(NodeSet nodeSet)

Sets the node set that the requirement asks for.

Can be null.

Parameters:
nodeSet - the node set that the requirement asks for.

setPreferredNodeFeatures

public void setPreferredNodeFeatures(java.util.Set<java.lang.String> preferredNodeFeatures)

Sets the list of node features the requirement prefers.

Can be null.

Parameters:
preferredNodeFeatures - the list of node features the requirement prefers.

setRequiredArchitecture

public void setRequiredArchitecture(java.lang.String requiredArchitecture)

Sets the required architecture.

Can be null.

Parameters:
requiredArchitecture - the required architecture.

setRequiredClass

public void setRequiredClass(java.lang.String requiredClass)

Sets the required class/queue.

Can be null.

Parameters:
requiredClass - the required class/queue.

setRequiredDiskPerTask

public void setRequiredDiskPerTask(int requiredDiskPerTask)
Sets the required disk in MB per task. If 0 or less, it is assumed the disk is not required.

Parameters:
requiredDiskPerTask - the required disk in MB per task

setRequiredMemoryPerTask

public void setRequiredMemoryPerTask(int requiredMemoryPerTask)
Sets the required memory in MB per task. If 0 or less, it is assumed the memory is not required.

Parameters:
requiredMemoryPerTask - the required memory in MB per task

setRequiredNetwork

public void setRequiredNetwork(java.lang.String requiredNetwork)

Sets the required network.

Can be null.

Parameters:
requiredNetwork - the required network.

setRequiredNodeCountMinimum

public void setRequiredNodeCountMinimum(java.lang.Integer requiredNodeCountMinimum)

Sets the minimum number of nodes called for by the requirement.

Can be null.

Parameters:
requiredNodeCountMinimum - the minimum number of nodes called for by the requirement.

setRequiredNodeDisk

public void setRequiredNodeDisk(java.lang.Integer requiredNodeDisk)

Sets the required disk space in MB across all nodes.

Can be null.

Parameters:
requiredNodeDisk - the required disk space in MB across all nodes.

setRequiredNodeFeatures

public void setRequiredNodeFeatures(java.util.Set<java.lang.String> nodeFeatures)

Sets the list of node features the requirement asks for.

Can be null.

Parameters:
nodeFeatures -

setRequiredNodeMemory

public void setRequiredNodeMemory(java.lang.Integer requiredNodeMemory)

Sets the required memory in MB across all nodes.

Can be null.

Parameters:
requiredNodeMemory - the required memory in MB across all nodes.

setRequiredNodeProcessors

public void setRequiredNodeProcessors(java.lang.Integer requiredNodeProcessors)

Sets the required processors needed on a per node basis.

Can be null.

Parameters:
requiredNodeProcessors - the required processors needed on a per node basis

setRequiredNodeSwap

public void setRequiredNodeSwap(java.lang.Integer requiredNodeSwap)

Sets the required swap in MB across all nodes.

Can be null.

Parameters:
requiredNodeSwap - the required swap in MB across all nodes.

setRequiredOS

public void setRequiredOS(java.lang.String requiredOS)

Sets the required operating system on each node.

Can be null.

Parameters:
requiredOS - the required operating system on each node. Can be null.

setRequiredPartition

public void setRequiredPartition(java.lang.String requiredPartition)
Sets the required partition/cluster for the requirement.

Parameters:
requiredPartition - the required partition/cluster for the requirement.

setRequiredProcessorCountMinimum

public void setRequiredProcessorCountMinimum(java.lang.Integer requireProcessorCountMinimum)

Sets the minimum number of processors called for by the requirement.

Can be null.

Parameters:
requireProcessorCountMinimum - the minimum number of processors called for by the requirement.

setRequiredProcessorsPerTask

public void setRequiredProcessorsPerTask(int requiredProcessorsPerTask)
Sets the required processors per task. If 0 or less, it is assumed processors is not required.

Parameters:
requiredProcessorsPerTask - the required memory in MB per task

setRequiredSwapPerTask

public void setRequiredSwapPerTask(int requiredSwapPerTask)
Sets the required swap in MB per task. If 0 or less, it is assumed the swap is not required.

Parameters:
requiredSwapPerTask - the required swap in MB per task

setTasksPerNode

public void setTasksPerNode(java.lang.Integer tasksPerNode)

Sets the number of tasks to map to each node.

Can be null.

Parameters:
tasksPerNode - the number of tasks to map to each node.

setGenericResource

public void setGenericResource(java.lang.String name,
                               java.lang.Integer amount)
Sets a generic resource requirement (This node may have many). It will overwrite an existing requirement if a generic resource of the same name of one already name exists as a requirement.

Parameters:
name - The name of the generic resource
amount - The amount of the generic resource required for this job.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.