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

## Class ReadinessCheck

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

- All Implemented Interfaces:
    Serializable

      @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public class ReadinessCheck
      extends Object
      implements Serializable

  A custom command or a pluggable helper container to determine the readiness of a container of a component. Readiness for every service is different. Hence the need for a simple interface, with scope to support advanced usecases.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReadinessCheck()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ReadinessCheck` | `artifact(Artifact artifact)` Artifact of the pluggable readiness check helper container (optional).
    `boolean` | `equals(Object o)`
    `Artifact` | `getArtifact()`
    `Map<String,String>` | `getProperties()` A blob of key value pairs that will be used to configure the check.
    `org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum` | `getType()`
    `int` | `hashCode()`
    `ReadinessCheck` | `properties(Map<String,String> properties)`
    `ReadinessCheck` | `putPropsItem(String key, String propsItem)`
    `void` | `setArtifact(Artifact artifact)`
    `void` | `setProperties(Map<String,String> properties)`
    `void` | `setType(org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum type)`
    `String` | `toString()`
    `ReadinessCheck` | `type(org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum type)` E.g.

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

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

- - ### Constructor Detail

    - #### ReadinessCheck

          public ReadinessCheck()

  - ### Method Detail

    - #### type

          public ReadinessCheck type(org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum type)

      E.g. HTTP (YARN will perform a simple REST call at a regular interval and expect a 204 No content).

    - #### getType

          public org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum getType()

    - #### setType

          public void setType(org.apache.hadoop.yarn.service.api.records.ReadinessCheck.TypeEnum type)

    - #### properties

          public ReadinessCheck properties(Map<String,String> properties)

    - #### putPropsItem

          public ReadinessCheck putPropsItem(String key,
                                             String propsItem)

    - #### getProperties

          public Map<String,String> getProperties()

      A blob of key value pairs that will be used to configure the check.
      Returns:
        properties

    - #### setProperties

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

    - #### artifact

          public ReadinessCheck artifact(Artifact artifact)

      Artifact of the pluggable readiness check helper container (optional). If specified, this helper container typically hosts the http uri and encapsulates the complex scripts required to perform actual container readiness check. At the end it is expected to respond a 204 No content just like the simplified use case. This pluggable framework benefits service owners who can run services without any packaging modifications. Note, artifacts of type docker only is supported for now.

    - #### getArtifact

          public Artifact getArtifact()

    - #### setArtifact

          public void setArtifact(Artifact artifact)

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

Copyright © 2022 Apache Software Foundation. All rights reserved.