Package org.apache.storm.validation
Class ConfigValidation
java.lang.Object
org.apache.storm.validation.ConfigValidation
Provides functionality for validating configuration fields.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
Checks if the named type derives from the specified Class.static class
static class
static class
Validates an entry for ImpersonationAclUser.static class
static class
Validates a Integer.static class
Validates Kryo Registration.static class
Validates each entry in a list against a list of custom Validators.static class
Validates each entry in a list.static class
Validates a list of a list of Strings.static class
validates each key and each value against the respective arrays of validators.static class
validates each key and value in a map of a certain type.static class
static class
static class
static class
validates a list of has no duplicates.static class
Validates if an object is not null.static class
static class
static class
Validates a positive number.static class
Validates if a number is a power of 2.static class
static class
Validates basic types.static class
Validates a String or a list of Strings.static class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isFieldAllowed
(Field field) static void
validateField
(Field field, Map<String, Object> conf) Validates a field given field.static void
validateField
(String fieldName, Map<String, Object> conf) Validates a field given field name as string uses Config.java as the default config classstatic void
Validates a field given field name as string.static void
validateFields
(Map<String, Object> conf) Validate all confs in map.static void
Validate all confs in map.static void
validateTopoConf
(Map<String, Object> topoConf) Validate topology conf.
-
Constructor Details
-
ConfigValidation
public ConfigValidation()
-
-
Method Details
-
getConfigClasses
-
validateField
Validates a field given field name as string uses Config.java as the default config class- Parameters:
fieldName
- provided as a stringconf
- map of confs
-
validateField
Validates a field given field name as string.- Parameters:
fieldName
- provided as a stringconf
- map of confsconfigs
- config class
-
validateField
Validates a field given field. Calls correct ValidatorField method based on which fields are declared for the corresponding annotation.- Parameters:
field
- field that needs to be validatedconf
- map of confs
-
validateTopoConf
Validate topology conf.- Parameters:
topoConf
- The topology conf.
-
validateFields
Validate all confs in map.- Parameters:
conf
- map of configs
-
validateFields
Validate all confs in map.- Parameters:
conf
- map of configsclasses
- config class
-
isFieldAllowed
-