Package org.apache.beam.sdk.options
Class PipelineOptionsValidator
java.lang.Object
org.apache.beam.sdk.options.PipelineOptionsValidator
Validates that the
PipelineOptions
conforms to all the Validation
criteria.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends PipelineOptions>
Tvalidate
(Class<T> klass, PipelineOptions options) Validates that the passedPipelineOptions
conforms to all the validation criteria from the passed in interface.static <T extends PipelineOptions>
TvalidateCli
(Class<T> klass, PipelineOptions options) Validates that the passedPipelineOptions
from command line interface (CLI) conforms to all the validation criteria from the passed in interface.
-
Constructor Details
-
PipelineOptionsValidator
public PipelineOptionsValidator()
-
-
Method Details
-
validate
Validates that the passedPipelineOptions
conforms to all the validation criteria from the passed in interface.Note that the interface requested must conform to the validation criteria specified on
PipelineOptions.as(Class)
.- Parameters:
klass
- The interface to fetch validation criteria from.options
- ThePipelineOptions
to validate.- Returns:
- Validated options.
-
validateCli
Validates that the passedPipelineOptions
from command line interface (CLI) conforms to all the validation criteria from the passed in interface.Note that the interface requested must conform to the validation criteria specified on
PipelineOptions.as(Class)
.- Parameters:
klass
- The interface to fetch validation criteria from.options
- ThePipelineOptions
to validate.- Returns:
- Validated options.
-