Addendum patch for YARN-5610. Contributed by Gour Saha
This commit is contained in:
parent
295b87d0fb
commit
f66ecfecf6
@ -48,8 +48,8 @@
|
||||
public class Application extends BaseResource {
|
||||
private static final long serialVersionUID = -4491694636566094885L;
|
||||
|
||||
private String id = null;
|
||||
private String name = null;
|
||||
private String id = null;
|
||||
private Artifact artifact = null;
|
||||
private Resource resource = null;
|
||||
private String launchCommand = null;
|
||||
@ -63,25 +63,7 @@ public class Application extends BaseResource {
|
||||
private List<Container> containers = new ArrayList<>();
|
||||
private ApplicationState state = null;
|
||||
private Map<String, String> quicklinks = null;
|
||||
private String queue;
|
||||
|
||||
/**
|
||||
* A unique application id.
|
||||
**/
|
||||
public Application id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", required = true, value = "A unique application id.")
|
||||
@JsonProperty("id")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
private String queue = null;
|
||||
|
||||
/**
|
||||
* A unique application name.
|
||||
@ -101,6 +83,24 @@ public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique application id.
|
||||
**/
|
||||
public Application id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "A unique application id.")
|
||||
@JsonProperty("id")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Artifact of single-component applications. Mandatory if components
|
||||
* attribute is not specified.
|
||||
@ -423,8 +423,8 @@ public String toString() {
|
||||
sb.append(" numberOfRunningContainers: ")
|
||||
.append(toIndentedString(numberOfRunningContainers)).append("\n");
|
||||
sb.append(" lifetime: ").append(toIndentedString(lifetime)).append("\n");
|
||||
sb.append(" placementPolicy: ")
|
||||
.append(toIndentedString(placementPolicy)).append("\n");
|
||||
sb.append(" placementPolicy: ").append(toIndentedString(placementPolicy))
|
||||
.append("\n");
|
||||
sb.append(" components: ").append(toIndentedString(components))
|
||||
.append("\n");
|
||||
sb.append(" configuration: ").append(toIndentedString(configuration))
|
||||
|
@ -17,9 +17,14 @@
|
||||
|
||||
package org.apache.hadoop.yarn.services.resource;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* The current state of an application.
|
||||
**/
|
||||
|
||||
@ApiModel(description = "The current state of an application.")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-06-02T08:15:05.615-07:00")
|
||||
public enum ApplicationState {
|
||||
ACCEPTED, STARTED, READY, STOPPED, FAILED;
|
||||
}
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
@ -33,7 +32,7 @@
|
||||
* GET API.
|
||||
**/
|
||||
|
||||
@ApiModel(description = "The current status of a submitted application, returned as a response to the GET api")
|
||||
@ApiModel(description = "The current status of a submitted application, returned as a response to the GET API.")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-06-02T08:15:05.615-07:00")
|
||||
@XmlRootElement
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ -60,20 +59,19 @@ public String getDiagnostics() {
|
||||
return diagnostics;
|
||||
}
|
||||
|
||||
@XmlElement(name = "diagnostics")
|
||||
public void setDiagnostics(String diagnostics) {
|
||||
this.diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Application state
|
||||
* Application state.
|
||||
**/
|
||||
public ApplicationStatus state(ApplicationState state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Application state")
|
||||
@ApiModelProperty(example = "null", value = "Application state.")
|
||||
@JsonProperty("state")
|
||||
public ApplicationState getState() {
|
||||
return state;
|
||||
|
@ -76,14 +76,14 @@ public void setId(String id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Artifact type, like docker, tarball, etc. (optional)
|
||||
* Artifact type, like docker, tarball, etc. (optional).
|
||||
**/
|
||||
public Artifact type(TypeEnum type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Artifact type, like docker, tarball, etc. (optional)")
|
||||
@ApiModelProperty(example = "null", value = "Artifact type, like docker, tarball, etc. (optional).")
|
||||
@JsonProperty("type")
|
||||
public TypeEnum getType() {
|
||||
return type;
|
||||
|
@ -202,8 +202,11 @@ public void setNumberOfContainers(Long numberOfContainers) {
|
||||
* dictates the initial number of components created. Component names
|
||||
* typically differ with a trailing id, but assumptions should not be made on
|
||||
* that, as the algorithm can change at any time. Configurations section will
|
||||
* be able to use placeholders like ${APP_COMPONENT_NAME} to get its component
|
||||
* name at runtime, and thereby differing in value at runtime. The best part
|
||||
* be able to use placeholders like ${USER}, ${CLUSTER_NAME} and
|
||||
* ${COMPONENT_NAME} to be replaced at runtime with user the app is submitted
|
||||
* as, application name and application component name respectively. Launch
|
||||
* command can use placeholders like ${APP_COMPONENT_NAME} and ${APP_NAME} to
|
||||
* get its component name and app name respectively at runtime. The best part
|
||||
* of this feature is that when the component is flexed up, entirely new
|
||||
* components (with new trailing ids) are created.
|
||||
**/
|
||||
@ -212,7 +215,7 @@ public Component uniqueComponentSupport(Boolean uniqueComponentSupport) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Certain applications need to define multiple components using the same artifact and resource profile, differing only in configurations. In such cases, this field helps app owners to avoid creating multiple component definitions with repeated information. The number_of_containers field dictates the initial number of components created. Component names typically differ with a trailing id, but assumptions should not be made on that, as the algorithm can change at any time. Configurations section will be able to use placeholders like ${APP_COMPONENT_NAME} to get its component name at runtime, and thereby differing in value at runtime. The best part of this feature is that when the component is flexed up, entirely new components (with new trailing ids) are created.")
|
||||
@ApiModelProperty(example = "null", value = "Certain applications need to define multiple components using the same artifact and resource profile, differing only in configurations. In such cases, this field helps app owners to avoid creating multiple component definitions with repeated information. The number_of_containers field dictates the initial number of components created. Component names typically differ with a trailing id, but assumptions should not be made on that, as the algorithm can change at any time. Configurations section will be able to use placeholders like ${USER}, ${CLUSTER_NAME} and ${COMPONENT_NAME} to be replaced at runtime with user the app is submitted as, application name and application component name respectively. Launch command can use placeholders like ${APP_COMPONENT_NAME} and ${APP_NAME} to get its component name and app name respectively at runtime. The best part of this feature is that when the component is flexed up, entirely new components (with new trailing ids) are created.")
|
||||
@JsonProperty("unique_component_support")
|
||||
public Boolean getUniqueComponentSupport() {
|
||||
return uniqueComponentSupport;
|
||||
@ -316,8 +319,7 @@ public boolean equals(java.lang.Object o) {
|
||||
&& Objects.equals(this.artifact, component.artifact)
|
||||
&& Objects.equals(this.launchCommand, component.launchCommand)
|
||||
&& Objects.equals(this.resource, component.resource)
|
||||
&& Objects
|
||||
.equals(this.numberOfContainers, component.numberOfContainers)
|
||||
&& Objects.equals(this.numberOfContainers, component.numberOfContainers)
|
||||
&& Objects.equals(this.uniqueComponentSupport,
|
||||
component.uniqueComponentSupport)
|
||||
&& Objects.equals(this.runPrivilegedContainer,
|
||||
@ -354,8 +356,8 @@ public String toString() {
|
||||
.append(toIndentedString(uniqueComponentSupport)).append("\n");
|
||||
sb.append(" runPrivilegedContainer: ")
|
||||
.append(toIndentedString(runPrivilegedContainer)).append("\n");
|
||||
sb.append(" placementPolicy: ")
|
||||
.append(toIndentedString(placementPolicy)).append("\n");
|
||||
sb.append(" placementPolicy: ").append(toIndentedString(placementPolicy))
|
||||
.append("\n");
|
||||
sb.append(" configuration: ").append(toIndentedString(configuration))
|
||||
.append("\n");
|
||||
sb.append(" quicklinks: ").append(toIndentedString(quicklinks))
|
||||
|
@ -29,6 +29,10 @@
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* An instance of a running application container.
|
||||
**/
|
||||
|
||||
@ApiModel(description = "An instance of a running application container")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-06-02T08:15:05.615-07:00")
|
||||
@XmlRootElement
|
||||
@ -47,14 +51,14 @@ public class Container extends BaseResource {
|
||||
|
||||
/**
|
||||
* Unique container id of a running application, e.g.
|
||||
* container_e3751_1458061340047_0008_01_000002
|
||||
* container_e3751_1458061340047_0008_01_000002.
|
||||
**/
|
||||
public Container id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "Unique container id of a running application, e.g. container_e3751_1458061340047_0008_01_000002")
|
||||
@ApiModelProperty(example = "null", value = "Unique container id of a running application, e.g. container_e3751_1458061340047_0008_01_000002.")
|
||||
@JsonProperty("id")
|
||||
public String getId() {
|
||||
return id;
|
||||
@ -65,7 +69,8 @@ public void setId(String id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* The time when the container was created, e.g. 2016-03-16T01:01:49.000Z. This will most likely be different from cluster launch time.
|
||||
* The time when the container was created, e.g. 2016-03-16T01:01:49.000Z.
|
||||
* This will most likely be different from cluster launch time.
|
||||
**/
|
||||
public Container launchTime(Date launchTime) {
|
||||
this.launchTime = launchTime;
|
||||
@ -126,14 +131,14 @@ public void setHostname(String hostname) {
|
||||
|
||||
/**
|
||||
* The bare node or host in which the container is running, e.g.
|
||||
* cn008.example.com
|
||||
* cn008.example.com.
|
||||
**/
|
||||
public Container bareHost(String bareHost) {
|
||||
this.bareHost = bareHost;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "The bare node or host in which the container is running, e.g. cn008.example.com")
|
||||
@ApiModelProperty(example = "null", value = "The bare node or host in which the container is running, e.g. cn008.example.com.")
|
||||
@JsonProperty("bare_host")
|
||||
public String getBareHost() {
|
||||
return bareHost;
|
||||
|
@ -57,15 +57,15 @@ public String toString() {
|
||||
private Artifact artifact = null;
|
||||
|
||||
/**
|
||||
* http (YARN will perform a simple REST call at a regular interval and expect
|
||||
* a 204 No content).
|
||||
* E.g. HTTP (YARN will perform a simple REST call at a regular interval and
|
||||
* expect a 204 No content).
|
||||
**/
|
||||
public ReadinessCheck type(TypeEnum type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ApiModelProperty(example = "null", value = "http (YARN will perform a simple REST call at a regular interval and expect a 204 No content).")
|
||||
@ApiModelProperty(example = "null", value = "E.g. HTTP (YARN will perform a simple REST call at a regular interval and expect a 204 No content).")
|
||||
@JsonProperty("type")
|
||||
public TypeEnum getType() {
|
||||
return type;
|
||||
|
Loading…
Reference in New Issue
Block a user