public class PartitionPlanImpl extends Object implements PartitionPlan
Constructor and Description |
---|
PartitionPlanImpl() |
Modifier and Type | Method and Description |
---|---|
Properties[] |
getPartitionProperties()
Gets array of Partition Properties objects for Partitions.
|
int |
getPartitions()
Gets count of Partitions.
|
boolean |
getPartitionsOverride()
Return current value of partition override setting.
|
int |
getThreads()
Gets maximum number of threads requested to use to run
partitions for this step.
|
void |
setPartitionProperties(Properties[] props)
Sets array of substitution Properties objects for the set of Partitions.
|
void |
setPartitions(int count)
Set number of partitions.
|
void |
setPartitionsOverride(boolean override)
Specify whether or not to override the partition
count from the previous job execution.
|
void |
setThreads(int count)
Set maximum number of threads requested to use to run
partitions for this step.
|
public void setPartitions(int count)
PartitionPlan
setPartitions
in interface PartitionPlan
count
- specifies the partition countpublic void setThreads(int count)
PartitionPlan
setThreads
in interface PartitionPlan
count
- specifies the requested thread countpublic void setPartitionsOverride(boolean override)
PartitionPlan
When false
is specified, the
partition count from the previous job execution is used
and any new value set for partition count in the current run
is ignored. In addition, partition results from the previous
job execution are remembered, and only incomplete partitions
are reprocessed.
When true
is specified, the partition count from the current run
is used and all results from past partitions are discarded. Any
resource cleanup or back out of work done in the previous run is the
responsibility of the application. The PartitionReducer artifact's
rollbackPartitionedStep method is invoked during restart before any
partitions begin processing to provide a cleanup hook.
setPartitionsOverride
in interface PartitionPlan
override
- See method descriptionpublic boolean getPartitionsOverride()
PartitionPlan
getPartitionsOverride
in interface PartitionPlan
PartitionPlan.setPartitionsOverride(boolean)
public void setPartitionProperties(Properties[] props)
PartitionPlan
setPartitionProperties
in interface PartitionPlan
props
- specifies the Properties object arrayPartitionPlan.getPartitionProperties()
public int getPartitions()
PartitionPlan
getPartitions
in interface PartitionPlan
public int getThreads()
PartitionPlan
getThreads
in interface PartitionPlan
public Properties[] getPartitionProperties()
PartitionPlan
These can be used in Job XML substitution using substitution expressions with the syntax: #{partitionPlan['propertyName']}
Each element of the Properties array returned can be used to resolving substitutions for a single partition. In the typical use case, each Properties element will have a similar set of property names, with a substitution potentially resolving to the corresponding value for each partition.
getPartitionProperties
in interface PartitionPlan
Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.