Interface ConfigUtils.ConfigContext

Enclosing class:
ConfigUtils

public static interface ConfigUtils.ConfigContext
Interface that provides context-specific config helper functions, factored out to support unit testing. *
  • Method Details

    • getenv

      Optional<String> getenv(String name)
      Returns a named environment variable.
      Parameters:
      name - Name of variable
      Returns:
      Value of variable
    • loadHadoopConfigFromDir

      org.apache.hadoop.conf.Configuration loadHadoopConfigFromDir(String configDir)
      Loads the Hadoop configuration from a directory.
      Parameters:
      configDir - The Hadoop config directory.
      Returns:
      The Hadoop configuration.
    • loadStorageCredentialsFromFile

      com.google.auth.oauth2.GoogleCredentials loadStorageCredentialsFromFile(String credentialsPath)
      Loads the Google credentials from a file.
      Parameters:
      credentialsPath - The path of the credentials file.
      Returns:
      The Google credentials.