com.novell.zos.jdl
Class ParameterSpace

java.lang.Object
  extended by com.novell.zos.jdl.ParameterSpace
All Implemented Interfaces:
java.io.Serializable

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

Defines a parameter space to be used by the scheduler to create a Joblet set. A parameter space may consist of rows of columns or a list of columns that is expanded and can be turned into a cross product.

Use appendRow to create a rowMajor parameter space or appendCol to define a column expansion. You cannot use both appendRow() and appendCol() in the same ParameterSpace. Once the scheduler defines a slice of the parameter space for a given Joblet, the scheduler creates JobletParameterSpace instances for each Joblet. This slice of the parameter space is delivered to the resource.
To limit how many Joblets or the number of rows in a Joblet, use setMaxJobletSize and/or use the jobletCount argument to schedule() or SchedulSpec.

See Also:
Serialized Form

Constructor Summary
ParameterSpace()
          Construct an instance of ParameterSpace
 
Method Summary
 void appendDimension(java.lang.String name, org.python.core.PyObject sequence)
          Append a definition for elements of a column.
 void appendRow(org.python.core.PyDictionary row)
          Append row to parameter list.
 void setMaxJobletSize(int maxJobletSize)
          Set maximum number of rows to fit into a Joblet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterSpace

public ParameterSpace()
Construct an instance of ParameterSpace

Method Detail

appendDimension

public void appendDimension(java.lang.String name,
                            org.python.core.PyObject sequence)
Append a definition for elements of a column. When more than one dimension is defined, a cross product will be generated by the scheduler. A List, XRange and FileRange can be supplied as a dimension.

Parameters:
name - Name of column
sequence - Definition for elements of column

appendRow

public void appendRow(org.python.core.PyDictionary row)
Append row to parameter list. Each row corresponds to a row that is received by a joblet that the Scheduler will assign to nodes. The number of rows assigned to a given joblet is determined by maxJobletSize

Parameters:
row - Dictionary of name/value pairs representing a column name and value

setMaxJobletSize

public void setMaxJobletSize(int maxJobletSize)
Set maximum number of rows to fit into a Joblet. This value determines the number of Joblets to create limited by the jobletCount argument passed to schedule.

For example, if a projected ParameterSpace creates 100 rows and the setMaxJobletSize() is set to 20, then 5 Joblets will be created. However, if a jobletCount of 1 is passed to schedule() or ScheduleSpec, that overrides the setMaxJobletSize value and only 1 Joblet will be created. This single Joblet will contain all 100 rows.

Parameters:
maxJobletSize - Maximum number of rows to fit into a Joblet


Copyright (c) 2008 Novell, Inc. All rights reserved.