Class ConfigValidation

java.lang.Object
org.apache.storm.validation.ConfigValidation

public class ConfigValidation extends Object
Provides functionality for validating configuration fields.
  • Constructor Details

    • ConfigValidation

      public ConfigValidation()
  • Method Details

    • getConfigClasses

      public static List<Class<?>> getConfigClasses()
    • validateField

      public static void validateField(String fieldName, Map<String,Object> conf)
      Validates a field given field name as string uses Config.java as the default config class
      Parameters:
      fieldName - provided as a string
      conf - map of confs
    • validateField

      public static void validateField(String fieldName, Map<String,Object> conf, List<Class<?>> configs)
      Validates a field given field name as string.
      Parameters:
      fieldName - provided as a string
      conf - map of confs
      configs - config class
    • validateField

      public static void validateField(Field field, Map<String,Object> conf)
      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 validated
      conf - map of confs
    • validateTopoConf

      public static void validateTopoConf(Map<String,Object> topoConf)
      Validate topology conf.
      Parameters:
      topoConf - The topology conf.
    • validateFields

      public static void validateFields(Map<String,Object> conf)
      Validate all confs in map.
      Parameters:
      conf - map of configs
    • validateFields

      public static void validateFields(Map<String,Object> conf, List<Class<?>> classes)
      Validate all confs in map.
      Parameters:
      conf - map of configs
      classes - config class
    • isFieldAllowed

      public static boolean isFieldAllowed(Field field)