org.apache.hadoop.yarn.service.api.records

## Class Configuration

- java.lang.Object
- - org.apache.hadoop.yarn.service.api.records.Configuration

- All Implemented Interfaces:
    Serializable

      @InterfaceAudience.Public
       @InterfaceStability.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:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Configuration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `boolean` | `equals(Object o)`
    `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.
    `Map<String,String>` | `getEnv()`
    `String` | `getEnv(String name)`
    `List<ConfigFile>` | `getFiles()`
    `Map<String,String>` | `getProperties()`
    `String` | `getProperty(String name)`
    `String` | `getProperty(String name, String defaultValue)`
    `boolean` | `getPropertyBool(String name, boolean defaultValue)`
    `int` | `getPropertyInt(String name, int defaultValue)`
    `long` | `getPropertyLong(String name, long defaultValue)`
    `int` | `hashCode()`
    `void` | `mergeFrom(Configuration that)` Merge all properties and envs from that configuration to this configration.
    `Configuration` | `properties(Map<String,String> properties)` A blob of key-value pairs of common service properties.
    `void` | `setEnv(Map<String,String> env)`
    `void` | `setFiles(List<ConfigFile> files)`
    `void` | `setProperties(Map<String,String> properties)`
    `void` | `setProperty(String name, String value)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Configuration

          public Configuration()

  - ### Method Detail

    - #### 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.

Copyright © 2022 Apache Software Foundation. All rights reserved.