This object is used in the onPartition()
callback of a custom partition node.
Methods ¶
addItemToPartition(work_item, index, required=False)
Adds a work item to the partition with the specified index. The required
flag indicates that the item is required for the partition to exist, and
the partition will be deleted if the item is deleted.
addItemToPartition(work_item, name, required=False)
Adds a work item to the partition with the specified string name. The
required
flag indicates that the item is required for the partition to
exist, and the partition will be deleted if the item is deleted.
Partition with string names are converted into indices once the partitioning step has completed. All of the named partitions are put into a list and sorted, and their order within the sorted list of names determines the index values for the partitions.
addItemToAllPartitions(work_item)
Adds the specified to all partitions, after the partitions have been constructed.
setPartitionFrame(index, frame)
Sets the frame of the partition with the specified index.
setPartitionFrame(name, frame)
Sets the frame of the partition with the specified string name.
isSplitting
: bool
Property
Set to True
if the Split by Attribute parameter on the partitioner is turned on.
maxIndex
: int
Property
The maximum index value that is currently used for a partition in this holder.
splitAttribute
: str
Property
If the Split by Attribute parameter on the partitioner is turned on, this property is set to the name of the attribute used to split input work items.
splitMissing
: list
of pdg.WorkItem
Property
The list of work items missing the split attribute when the Split by Attribute parameter on the partitioner is turned on. This list is empty unless the node also has the Missing Attribute parameter configured so that it handles missing items itself.
splitValue
: str
Property
If the the Split by Attribute parameter on the partitioner is turned on, this property is set to the split value being processed by the current call to onPartition
. Each split value results in a separate, independent call to the partitioning function.