Class Configuration

java.lang.Object
org.apache.hadoop.yarn.service.api.records.Configuration
All Implemented Interfaces:
Serializable

@Public @Unstable public class Configuration extends Object implements Serializable
Set of configuration properties that can be injected into the service components via envs, files and custom pluggable helper docker containers. Files of several standard formats like xml, properties, json, yaml and templates will be supported.
See Also:
  • Constructor Details

    • Configuration

      public Configuration()
  • Method Details

    • properties

      public Configuration properties(Map<String,String> properties)
      A blob of key-value pairs of common service properties.
    • getProperties

      public Map<String,String> getProperties()
    • setProperties

      public void setProperties(Map<String,String> properties)
    • env

      public Configuration env(Map<String,String> env)
      A blob of key-value pairs which will be appended to the default system properties and handed off to the service at start time. All placeholder references to properties will be substituted before injection.
    • getEnv

      public Map<String,String> getEnv()
    • setEnv

      public void setEnv(Map<String,String> env)
    • files

      public Configuration files(List<ConfigFile> files)
      Array of list of files that needs to be created and made available as volumes in the service component containers.
    • getFiles

      public List<ConfigFile> getFiles()
    • setFiles

      public void setFiles(List<ConfigFile> files)
    • getPropertyLong

      public long getPropertyLong(String name, long defaultValue)
    • getPropertyInt

      public int getPropertyInt(String name, int defaultValue)
    • getPropertyBool

      public boolean getPropertyBool(String name, boolean defaultValue)
    • getProperty

      public String getProperty(String name, String defaultValue)
    • setProperty

      public void setProperty(String name, String value)
    • getProperty

      public String getProperty(String name)
    • getEnv

      public String getEnv(String name)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • mergeFrom

      public void mergeFrom(Configuration that)
      Merge all properties and envs from that configuration to this configration. For ConfigFiles, all properties and envs of that ConfigFile are merged into this ConfigFile.