
gobblin.service.JobStatus Maven / Gradle / Ivy
The newest version!
package gobblin.service;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import com.linkedin.data.DataMap;
import com.linkedin.data.schema.PathSpec;
import com.linkedin.data.schema.RecordDataSchema;
import com.linkedin.data.template.DataTemplateUtil;
import com.linkedin.data.template.GetMode;
import com.linkedin.data.template.RecordTemplate;
import com.linkedin.data.template.SetMode;
/**
* Execution status for a job
*
*/
@Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Data Template. Generated from /Users/ibuenros/repos/gobblin/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-api/src/main/pegasus/gobblin/service/JobStatus.pdsc.", date = "Fri Jul 21 13:35:27 PDT 2017")
public class JobStatus
extends RecordTemplate
{
private final static JobStatus.Fields _fields = new JobStatus.Fields();
private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"JobStatus\",\"namespace\":\"gobblin.service\",\"doc\":\"Execution status for a job\",\"fields\":[{\"name\":\"flowId\",\"type\":{\"type\":\"record\",\"name\":\"FlowId\",\"doc\":\"Identifier for a Gobblin as a Service flow\",\"fields\":[{\"name\":\"flowName\",\"type\":\"string\",\"doc\":\"Name of the flow\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}},{\"name\":\"flowGroup\",\"type\":\"string\",\"doc\":\"Group of the flow. This defines the namespace for the flow.\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}}]},\"doc\":\"Identifier of the flow the job belongs to\"},{\"name\":\"jobId\",\"type\":{\"type\":\"record\",\"name\":\"JobId\",\"doc\":\"Identifier for a Gobblin job\",\"fields\":[{\"name\":\"jobName\",\"type\":\"string\",\"doc\":\"Name of the job\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}},{\"name\":\"jobGroup\",\"type\":\"string\",\"doc\":\"Group of the job. This defines the namespace for the job.\",\"validate\":{\"strlen\":{\"min\":1,\"max\":128}}}]},\"doc\":\"Identifier of the job\"},{\"name\":\"executionStatus\",\"type\":{\"type\":\"enum\",\"name\":\"ExecutionStatus\",\"doc\":\"Execution status for a flow or job\",\"symbols\":[\"RUNNING\",\"FAILED\",\"COMPLETE\"],\"symbolDocs\":{\"RUNNING\":\"Flow or job is currently executing\",\"FAILED\":\"Flow or job failed\",\"COMPLETE\":\"Flow or job completed execution\"}},\"doc\":\"Job execution status\"},{\"name\":\"message\",\"type\":\"string\",\"doc\":\"Error or status message\"},{\"name\":\"executionStatistics\",\"type\":{\"type\":\"record\",\"name\":\"JobStatistics\",\"doc\":\"Statistics from a job execution\",\"fields\":[{\"name\":\"executionStartTime\",\"type\":\"long\",\"doc\":\"Epoch time of when the execution began\"},{\"name\":\"executionEndTime\",\"type\":\"long\",\"doc\":\"Epoch time of when the execution ended\"},{\"name\":\"processedCount\",\"type\":\"long\",\"doc\":\"number of records processed in the last job execution\"}]},\"doc\":\"Statistics from the job execution. The values may be updated during the run of a job.\"},{\"name\":\"jobState\",\"type\":{\"type\":\"record\",\"name\":\"JobState\",\"doc\":\"Job state that is updated at the end of an execution\",\"fields\":[{\"name\":\"lowWatermark\",\"type\":\"string\",\"doc\":\"Low watermark after last execution\"},{\"name\":\"highWatermark\",\"type\":\"string\",\"doc\":\"High watermark after last execution\"}]},\"doc\":\"Job state that is updated only at the start and end of a job execution.\"}]}"));
private final static RecordDataSchema.Field FIELD_FlowId = SCHEMA.getField("flowId");
private final static RecordDataSchema.Field FIELD_JobId = SCHEMA.getField("jobId");
private final static RecordDataSchema.Field FIELD_ExecutionStatus = SCHEMA.getField("executionStatus");
private final static RecordDataSchema.Field FIELD_Message = SCHEMA.getField("message");
private final static RecordDataSchema.Field FIELD_ExecutionStatistics = SCHEMA.getField("executionStatistics");
private final static RecordDataSchema.Field FIELD_JobState = SCHEMA.getField("jobState");
public JobStatus() {
super(new DataMap(), SCHEMA);
}
public JobStatus(DataMap data) {
super(data, SCHEMA);
}
public static JobStatus.Fields fields() {
return _fields;
}
/**
* Existence checker for flowId
*
* @see JobStatus.Fields#flowId
*/
public boolean hasFlowId() {
return contains(FIELD_FlowId);
}
/**
* Remover for flowId
*
* @see JobStatus.Fields#flowId
*/
public void removeFlowId() {
remove(FIELD_FlowId);
}
/**
* Getter for flowId
*
* @see JobStatus.Fields#flowId
*/
public FlowId getFlowId(GetMode mode) {
return obtainWrapped(FIELD_FlowId, FlowId.class, mode);
}
/**
* Getter for flowId
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#flowId
*/
@Nonnull
public FlowId getFlowId() {
return obtainWrapped(FIELD_FlowId, FlowId.class, GetMode.STRICT);
}
/**
* Setter for flowId
*
* @see JobStatus.Fields#flowId
*/
public JobStatus setFlowId(FlowId value, SetMode mode) {
putWrapped(FIELD_FlowId, FlowId.class, value, mode);
return this;
}
/**
* Setter for flowId
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#flowId
*/
public JobStatus setFlowId(
@Nonnull
FlowId value) {
putWrapped(FIELD_FlowId, FlowId.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for jobId
*
* @see JobStatus.Fields#jobId
*/
public boolean hasJobId() {
return contains(FIELD_JobId);
}
/**
* Remover for jobId
*
* @see JobStatus.Fields#jobId
*/
public void removeJobId() {
remove(FIELD_JobId);
}
/**
* Getter for jobId
*
* @see JobStatus.Fields#jobId
*/
public JobId getJobId(GetMode mode) {
return obtainWrapped(FIELD_JobId, JobId.class, mode);
}
/**
* Getter for jobId
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#jobId
*/
@Nonnull
public JobId getJobId() {
return obtainWrapped(FIELD_JobId, JobId.class, GetMode.STRICT);
}
/**
* Setter for jobId
*
* @see JobStatus.Fields#jobId
*/
public JobStatus setJobId(JobId value, SetMode mode) {
putWrapped(FIELD_JobId, JobId.class, value, mode);
return this;
}
/**
* Setter for jobId
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#jobId
*/
public JobStatus setJobId(
@Nonnull
JobId value) {
putWrapped(FIELD_JobId, JobId.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for executionStatus
*
* @see JobStatus.Fields#executionStatus
*/
public boolean hasExecutionStatus() {
return contains(FIELD_ExecutionStatus);
}
/**
* Remover for executionStatus
*
* @see JobStatus.Fields#executionStatus
*/
public void removeExecutionStatus() {
remove(FIELD_ExecutionStatus);
}
/**
* Getter for executionStatus
*
* @see JobStatus.Fields#executionStatus
*/
public ExecutionStatus getExecutionStatus(GetMode mode) {
return obtainDirect(FIELD_ExecutionStatus, ExecutionStatus.class, mode);
}
/**
* Getter for executionStatus
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#executionStatus
*/
@Nonnull
public ExecutionStatus getExecutionStatus() {
return obtainDirect(FIELD_ExecutionStatus, ExecutionStatus.class, GetMode.STRICT);
}
/**
* Setter for executionStatus
*
* @see JobStatus.Fields#executionStatus
*/
public JobStatus setExecutionStatus(ExecutionStatus value, SetMode mode) {
putDirect(FIELD_ExecutionStatus, ExecutionStatus.class, String.class, value, mode);
return this;
}
/**
* Setter for executionStatus
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#executionStatus
*/
public JobStatus setExecutionStatus(
@Nonnull
ExecutionStatus value) {
putDirect(FIELD_ExecutionStatus, ExecutionStatus.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for message
*
* @see JobStatus.Fields#message
*/
public boolean hasMessage() {
return contains(FIELD_Message);
}
/**
* Remover for message
*
* @see JobStatus.Fields#message
*/
public void removeMessage() {
remove(FIELD_Message);
}
/**
* Getter for message
*
* @see JobStatus.Fields#message
*/
public String getMessage(GetMode mode) {
return obtainDirect(FIELD_Message, String.class, mode);
}
/**
* Getter for message
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#message
*/
@Nonnull
public String getMessage() {
return obtainDirect(FIELD_Message, String.class, GetMode.STRICT);
}
/**
* Setter for message
*
* @see JobStatus.Fields#message
*/
public JobStatus setMessage(String value, SetMode mode) {
putDirect(FIELD_Message, String.class, String.class, value, mode);
return this;
}
/**
* Setter for message
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#message
*/
public JobStatus setMessage(
@Nonnull
String value) {
putDirect(FIELD_Message, String.class, String.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for executionStatistics
*
* @see JobStatus.Fields#executionStatistics
*/
public boolean hasExecutionStatistics() {
return contains(FIELD_ExecutionStatistics);
}
/**
* Remover for executionStatistics
*
* @see JobStatus.Fields#executionStatistics
*/
public void removeExecutionStatistics() {
remove(FIELD_ExecutionStatistics);
}
/**
* Getter for executionStatistics
*
* @see JobStatus.Fields#executionStatistics
*/
public JobStatistics getExecutionStatistics(GetMode mode) {
return obtainWrapped(FIELD_ExecutionStatistics, JobStatistics.class, mode);
}
/**
* Getter for executionStatistics
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#executionStatistics
*/
@Nonnull
public JobStatistics getExecutionStatistics() {
return obtainWrapped(FIELD_ExecutionStatistics, JobStatistics.class, GetMode.STRICT);
}
/**
* Setter for executionStatistics
*
* @see JobStatus.Fields#executionStatistics
*/
public JobStatus setExecutionStatistics(JobStatistics value, SetMode mode) {
putWrapped(FIELD_ExecutionStatistics, JobStatistics.class, value, mode);
return this;
}
/**
* Setter for executionStatistics
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#executionStatistics
*/
public JobStatus setExecutionStatistics(
@Nonnull
JobStatistics value) {
putWrapped(FIELD_ExecutionStatistics, JobStatistics.class, value, SetMode.DISALLOW_NULL);
return this;
}
/**
* Existence checker for jobState
*
* @see JobStatus.Fields#jobState
*/
public boolean hasJobState() {
return contains(FIELD_JobState);
}
/**
* Remover for jobState
*
* @see JobStatus.Fields#jobState
*/
public void removeJobState() {
remove(FIELD_JobState);
}
/**
* Getter for jobState
*
* @see JobStatus.Fields#jobState
*/
public JobState getJobState(GetMode mode) {
return obtainWrapped(FIELD_JobState, JobState.class, mode);
}
/**
* Getter for jobState
*
* @return
* Required field. Could be null for partial record.
* @see JobStatus.Fields#jobState
*/
@Nonnull
public JobState getJobState() {
return obtainWrapped(FIELD_JobState, JobState.class, GetMode.STRICT);
}
/**
* Setter for jobState
*
* @see JobStatus.Fields#jobState
*/
public JobStatus setJobState(JobState value, SetMode mode) {
putWrapped(FIELD_JobState, JobState.class, value, mode);
return this;
}
/**
* Setter for jobState
*
* @param value
* Must not be null. For more control, use setters with mode instead.
* @see JobStatus.Fields#jobState
*/
public JobStatus setJobState(
@Nonnull
JobState value) {
putWrapped(FIELD_JobState, JobState.class, value, SetMode.DISALLOW_NULL);
return this;
}
@Override
public JobStatus clone()
throws CloneNotSupportedException
{
return ((JobStatus) super.clone());
}
@Override
public JobStatus copy()
throws CloneNotSupportedException
{
return ((JobStatus) super.copy());
}
public static class Fields
extends PathSpec
{
public Fields(List path, String name) {
super(path, name);
}
public Fields() {
super();
}
/**
* Identifier of the flow the job belongs to
*
*/
public gobblin.service.FlowId.Fields flowId() {
return new gobblin.service.FlowId.Fields(getPathComponents(), "flowId");
}
/**
* Identifier of the job
*
*/
public gobblin.service.JobId.Fields jobId() {
return new gobblin.service.JobId.Fields(getPathComponents(), "jobId");
}
/**
* Job execution status
*
*/
public PathSpec executionStatus() {
return new PathSpec(getPathComponents(), "executionStatus");
}
/**
* Error or status message
*
*/
public PathSpec message() {
return new PathSpec(getPathComponents(), "message");
}
/**
* Statistics from the job execution. The values may be updated during the run of a job.
*
*/
public gobblin.service.JobStatistics.Fields executionStatistics() {
return new gobblin.service.JobStatistics.Fields(getPathComponents(), "executionStatistics");
}
/**
* Job state that is updated only at the start and end of a job execution.
*
*/
public gobblin.service.JobState.Fields jobState() {
return new gobblin.service.JobState.Fields(getPathComponents(), "jobState");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy