Class PipelineOptionsValidator

java.lang.Object
org.apache.beam.sdk.options.PipelineOptionsValidator

public class PipelineOptionsValidator extends Object
Validates that the PipelineOptions conforms to all the Validation criteria.
  • Constructor Details

    • PipelineOptionsValidator

      public PipelineOptionsValidator()
  • Method Details

    • validate

      public static <T extends PipelineOptions> T validate(Class<T> klass, PipelineOptions options)
      Validates that the passed PipelineOptions 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 - The PipelineOptions to validate.
      Returns:
      Validated options.
    • validateCli

      public static <T extends PipelineOptions> T validateCli(Class<T> klass, PipelineOptions options)
      Validates that the passed PipelineOptions 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 - The PipelineOptions to validate.
      Returns:
      Validated options.