public class DefaultParallelismFactory extends java.lang.Object implements DefaultValueFactory<java.lang.Integer>
DefaultValueFactory
for getting a default value for the parallelism option
on FlinkPipelineOptions
.
This will return either the default value from GlobalConfiguration
or 1
.
A valid GlobalConfiguration
is only available if the program is executed by the Flink
run scripts.
Constructor and Description |
---|
DefaultParallelismFactory() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
create(PipelineOptions options)
Creates a default value for a getter marked with
Default.InstanceFactory . |
public java.lang.Integer create(PipelineOptions options)
DefaultValueFactory
Default.InstanceFactory
.create
in interface DefaultValueFactory<java.lang.Integer>
options
- The current pipeline options.