Package org.apache.hadoop.fs.azurebfs.diagnostics

Class Base64StringConfigurationBasicValidator

java.lang.Object
org.apache.hadoop.fs.azurebfs.diagnostics.Base64StringConfigurationBasicValidator
All Implemented Interfaces:
org.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator

@Public @Evolving public class Base64StringConfigurationBasicValidator extends Object implements org.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator
String Base64 configuration value Validator.
  • Constructor Details

    • Base64StringConfigurationBasicValidator

      public Base64StringConfigurationBasicValidator(String configKey, String defaultVal, boolean throwIfInvalid)
  • Method Details

    • validate

      public String validate(String configValue) throws InvalidConfigurationValueException
      This method handles the base case where the configValue is null, based on the throwIfInvalid it either throws or returns the defaultVal, otherwise it returns null indicating that the configValue needs to be validated further.
      Specified by:
      validate in interface org.apache.hadoop.fs.azurebfs.contracts.diagnostics.ConfigurationValidator
      Parameters:
      configValue - the configuration value set by the user
      Returns:
      the defaultVal in case the configValue is null and not required to be set, null in case the configValue not null
      Throws:
      InvalidConfigurationValueException - in case the configValue is null and required to be set
    • getDefaultVal

      public String getDefaultVal()
    • getConfigKey

      public String getConfigKey()
    • getThrowIfInvalid

      public boolean getThrowIfInvalid()