Class ReadinessCheck

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

@Public @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:
  • Constructor Details

    • ReadinessCheck

      public ReadinessCheck()
  • Method Details

    • type

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

      public ReadinessCheck.TypeEnum getType()
    • setType

      public void setType(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