spark.core.config_validation#

Classes#

ConfigurationValidator

Base class for validators for the fields in a SparkConfig.

TypeValidator

Validates the type of the field against a set of valid_types defined in the metadata.

PositiveValidator

Validates that the value(s) of the attribute are greater than zero.

BinaryValidator

Validates that the value(s) of the attribute are in the set {0,1}.

ZeroOneValidator

Validates that the value(s) of the attribute are in the range [0,1].

Module Contents#

class spark.core.config_validation.ConfigurationValidator(field)[source]#

Base class for validators for the fields in a SparkConfig.

Parameters:

field (dataclasses.Field)

field[source]#
abstractmethod validate(value)[source]#
Parameters:

value (Any)

Return type:

None

class spark.core.config_validation.TypeValidator(field)[source]#

Bases: ConfigurationValidator

Validates the type of the field against a set of valid_types defined in the metadata.

Parameters:

field (dataclasses.Field)

validate(value)[source]#
Parameters:

value (Any)

Return type:

None

class spark.core.config_validation.PositiveValidator(field)[source]#

Bases: ConfigurationValidator

Validates that the value(s) of the attribute are greater than zero.

Parameters:

field (dataclasses.Field)

validate(value)[source]#
Parameters:

value (Any)

Return type:

None

class spark.core.config_validation.BinaryValidator(field)[source]#

Bases: ConfigurationValidator

Validates that the value(s) of the attribute are in the set {0,1}.

Parameters:

field (dataclasses.Field)

validate(value)[source]#
Parameters:

value (Any)

Return type:

None

class spark.core.config_validation.ZeroOneValidator(field)[source]#

Bases: ConfigurationValidator

Validates that the value(s) of the attribute are in the range [0,1].

Parameters:

field (dataclasses.Field)

validate(value)[source]#
Parameters:

value (Any)

Return type:

None