Class Service
java.lang.Object
org.apache.hadoop.yarn.service.api.records.BaseResource
org.apache.hadoop.yarn.service.api.records.Service
- All Implemented Interfaces:
Serializable
An Service resource has the following attributes.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(Component component) Artifact of single-component services.components(List<Component> components) Components of an service.configuration(Configuration configuration) Config properties of an service.description(String description) Description of the service.dockerClientConfig(String dockerClientConfig) booleangetComponent(String name) The Docker client config for the service.getId()The Kerberos Principal of the service.getName()getQueue()getState()inthashCode()A unique service id.kerberosPrincipal(KerberosPrincipal kerberosPrincipal) launchTime(Date launchTime) The time when the service was created, e.g. 2016-03-16T01:01:49.000Z.Life time (in seconds) of the service from the time it reaches the RUNNING_BUT_UNREADY state (after which it is automatically destroyed by YARN).A unique service name.numberOfRunningContainers(Long numberOfRunningContainers) In get response this provides the total number of running containers for this service (across all components) at the time of request.The YARN queue that this service should be submitted to.quicklinks(Map<String, String> quicklinks) A blob of key-value pairs of quicklinks to be exported for an service.Resource of single-component services or the global default for multi-component services.voidsetArtifact(Artifact artifact) voidsetComponents(List<Component> components) voidsetConfiguration(Configuration configuration) voidsetDependencies(List<String> dependencies) voidsetDescription(String description) voidsetDockerClientConfig(String dockerClientConfig) voidvoidsetKerberosPrincipal(KerberosPrincipal kerberosPrincipal) voidsetLaunchTime(Date launchTime) voidsetLifetime(Long lifetime) voidvoidsetNumberOfRunningContainers(Long numberOfRunningContainers) voidvoidsetQuicklinks(Map<String, String> quicklinks) voidsetResource(Resource resource) voidsetState(ServiceState state) voidsetVersion(String version) state(ServiceState state) State of the service.toString()Version of the service.Methods inherited from class org.apache.hadoop.yarn.service.api.records.BaseResource
getUri, setUri
-
Constructor Details
-
Service
public Service()
-
-
Method Details
-
name
A unique service name. -
getName
-
setName
-
id
A unique service id. -
getId
-
setId
-
getVersion
-
setVersion
-
version
Version of the service. -
getDescription
-
setDescription
-
description
Description of the service. -
artifact
Artifact of single-component services. Mandatory if components attribute is not specified. -
getArtifact
-
setArtifact
-
resource
Resource of single-component services or the global default for multi-component services. Mandatory if it is a single-component service and if cpus and memory are not specified at the Service level. -
getResource
-
setResource
-
launchTime
The time when the service was created, e.g. 2016-03-16T01:01:49.000Z. -
getLaunchTime
-
setLaunchTime
-
numberOfRunningContainers
In get response this provides the total number of running containers for this service (across all components) at the time of request. Note, a subsequent request can return a different number as and when more containers get allocated until it reaches the total number of containers or if a flex request has been made between the two requests. -
getNumberOfRunningContainers
-
setNumberOfRunningContainers
-
lifetime
Life time (in seconds) of the service from the time it reaches the RUNNING_BUT_UNREADY state (after which it is automatically destroyed by YARN). For unlimited lifetime do not set a lifetime value. -
getLifetime
-
setLifetime
-
components
Components of an service. -
getComponents
-
setComponents
-
addComponent
-
getComponent
-
configuration
Config properties of an service. Configurations provided at the service/global level are available to all the components. Specific properties can be overridden at the component level. -
getConfiguration
-
setConfiguration
-
state
State of the service. Specifying a value for this attribute for the POST payload raises a validation error. This attribute is available only in the GET response of a started service. -
getState
-
setState
-
quicklinks
A blob of key-value pairs of quicklinks to be exported for an service. -
getQuicklinks
-
setQuicklinks
-
queue
The YARN queue that this service should be submitted to. -
getQueue
-
setQueue
-
getDependencies
-
setDependencies
-
kerberosPrincipal
-
getKerberosPrincipal
The Kerberos Principal of the service.- Returns:
- kerberosPrincipal
-
setKerberosPrincipal
-
dockerClientConfig
-
getDockerClientConfig
The Docker client config for the service.- Returns:
- dockerClientConfig
-
setDockerClientConfig
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classBaseResource
-