Skip to main content

Class GetJobResponse

java.lang.Object
com.gpudb.protocol.GetJobResponse
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class GetJobResponse extends Object implements org.apache.avro.generic.IndexedRecord
A set of results returned by GPUdb.getJob.
  • Constructor Details

    • GetJobResponse

      public GetJobResponse()
      Constructs a GetJobResponse object with default parameters.
  • Method Details

    • getClassSchema

      public static org.apache.avro.Schema getClassSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Returns:
      The schema for the class.
    • getEndpoint

      public String getEndpoint()
      The endpoint which is being executed asynchronously. E.g. ‘/alter/table’.
      Returns:
      The current value of endpoint.
    • setEndpoint

      public GetJobResponse setEndpoint(String endpoint)
      The endpoint which is being executed asynchronously. E.g. ‘/alter/table’.
      Parameters:
      endpoint - The new value for endpoint.
      Returns:
      this to mimic the builder pattern.
    • getJobStatus

      public String getJobStatus()
      Status of the submitted job. Supported values:
      • RUNNING: The job is currently executing.
      • DONE: The job execution has successfully completed and the response is included in the jobResponse or jobResponseStr field.
      • ERROR: The job was attempted, but an error was encountered. The statusMap contains the details of the error in error_message.
      • CANCELLED: Job cancellation was requested while the execution was in progress.
      Returns:
      The current value of jobStatus.
    • setJobStatus

      public GetJobResponse setJobStatus(String jobStatus)
      Status of the submitted job. Supported values:
      • RUNNING: The job is currently executing.
      • DONE: The job execution has successfully completed and the response is included in the jobResponse or jobResponseStr field.
      • ERROR: The job was attempted, but an error was encountered. The statusMap contains the details of the error in error_message.
      • CANCELLED: Job cancellation was requested while the execution was in progress.
      Parameters:
      jobStatus - The new value for jobStatus.
      Returns:
      this to mimic the builder pattern.
    • getRunning

      public boolean getRunning()
      True if the end point is still executing.
      Returns:
      The current value of running.
    • setRunning

      public GetJobResponse setRunning(boolean running)
      True if the end point is still executing.
      Parameters:
      running - The new value for running.
      Returns:
      this to mimic the builder pattern.
    • getProgress

      public int getProgress()
      Approximate percentage of the job completed.
      Returns:
      The current value of progress.
    • setProgress

      public GetJobResponse setProgress(int progress)
      Approximate percentage of the job completed.
      Parameters:
      progress - The new value for progress.
      Returns:
      this to mimic the builder pattern.
    • getSuccessful

      public boolean getSuccessful()
      True if the job execution completed and no errors were encountered.
      Returns:
      The current value of successful.
    • setSuccessful

      public GetJobResponse setSuccessful(boolean successful)
      True if the job execution completed and no errors were encountered.
      Parameters:
      successful - The new value for successful.
      Returns:
      this to mimic the builder pattern.
    • getResponseEncoding

      public String getResponseEncoding()
      The encoding of the job result (contained in jobResponse or jobResponseStr. Supported values:
      Returns:
      The current value of responseEncoding.
    • setResponseEncoding

      public GetJobResponse setResponseEncoding(String responseEncoding)
      The encoding of the job result (contained in jobResponse or jobResponseStr. Supported values:
      Parameters:
      responseEncoding - The new value for responseEncoding.
      Returns:
      this to mimic the builder pattern.
    • getJobResponse

      public ByteBuffer getJobResponse()
      The binary-encoded response of the job. This field is populated only when the job has completed and responseEncoding is BINARY.
      Returns:
      The current value of jobResponse.
    • setJobResponse

      public GetJobResponse setJobResponse(ByteBuffer jobResponse)
      The binary-encoded response of the job. This field is populated only when the job has completed and responseEncoding is BINARY.
      Parameters:
      jobResponse - The new value for jobResponse.
      Returns:
      this to mimic the builder pattern.
    • getJobResponseStr

      public String getJobResponseStr()
      The json-encoded response of the job. This field is populated only when the job has completed and responseEncoding is JSON.
      Returns:
      The current value of jobResponseStr.
    • setJobResponseStr

      public GetJobResponse setJobResponseStr(String jobResponseStr)
      The json-encoded response of the job. This field is populated only when the job has completed and responseEncoding is JSON.
      Parameters:
      jobResponseStr - The new value for jobResponseStr.
      Returns:
      this to mimic the builder pattern.
    • getStatusMap

      public Map<String,String> getStatusMap()
      Map of various status strings for the executed job.
      • ERROR_MESSAGE: Explains what error occurred while running the job asynchronously. This entry only exists when the job status is ERROR.
      Returns:
      The current value of statusMap.
    • setStatusMap

      public GetJobResponse setStatusMap(Map<String,String> statusMap)
      Map of various status strings for the executed job.
      • ERROR_MESSAGE: Explains what error occurred while running the job asynchronously. This entry only exists when the job status is ERROR.
      Parameters:
      statusMap - The new value for statusMap.
      Returns:
      this to mimic the builder pattern.
    • getInfo

      public Map<String,String> getInfo()
      Additional information.
      Returns:
      The current value of info.
    • setInfo

      public GetJobResponse setInfo(Map<String,String> info)
      Additional information.
      Parameters:
      info - The new value for info.
      Returns:
      this to mimic the builder pattern.
    • getSchema

      public org.apache.avro.Schema getSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
      Returns:
      The schema object describing this class.
    • get

      public Object get(int index)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to get
      Returns:
      value of the field with the given index.
      Throws:
    • put

      public void put(int index, Object value)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to set
      value - the value to set
      Throws:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object