public class GetJobResponse extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.getJob(GetJobRequest)
.Modifier and Type | Class and Description |
---|---|
static class |
GetJobResponse.JobStatus
Status of the submitted job.
|
static class |
GetJobResponse.ResponseEncoding
The encoding of the job result (contained in
jobResponse or
jobResponseStr . |
static class |
GetJobResponse.StatusMap
Map of various status strings for the executed job.
|
Constructor and Description |
---|
GetJobResponse()
Constructs a GetJobResponse object with default parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getEndpoint() |
ByteBuffer |
getJobResponse() |
String |
getJobResponseStr() |
String |
getJobStatus() |
int |
getProgress() |
String |
getResponseEncoding() |
boolean |
getRunning() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getStatusMap() |
boolean |
getSuccessful() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
GetJobResponse |
setEndpoint(String endpoint) |
GetJobResponse |
setJobResponse(ByteBuffer jobResponse) |
GetJobResponse |
setJobResponseStr(String jobResponseStr) |
GetJobResponse |
setJobStatus(String jobStatus) |
GetJobResponse |
setProgress(int progress) |
GetJobResponse |
setResponseEncoding(String responseEncoding) |
GetJobResponse |
setRunning(boolean running) |
GetJobResponse |
setStatusMap(Map<String,String> statusMap) |
GetJobResponse |
setSuccessful(boolean successful) |
String |
toString() |
public GetJobResponse()
public static org.apache.avro.Schema getClassSchema()
public String getEndpoint()
public GetJobResponse setEndpoint(String endpoint)
endpoint
- The endpoint which is being executed asynchronously.
E.g. '/alter/table'.this
to mimic the builder pattern.public String getJobStatus()
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.
public GetJobResponse setJobStatus(String jobStatus)
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.
this
to mimic the builder pattern.public boolean getRunning()
public GetJobResponse setRunning(boolean running)
running
- True if the end point is still executing.this
to mimic the builder pattern.public int getProgress()
public GetJobResponse setProgress(int progress)
progress
- Approximate percentage of the job completed.this
to mimic the builder pattern.public boolean getSuccessful()
public GetJobResponse setSuccessful(boolean successful)
successful
- True if the job execution completed and no errors
were encountered.this
to mimic the builder pattern.public String getResponseEncoding()
public GetJobResponse setResponseEncoding(String responseEncoding)
responseEncoding
- The encoding of the job result (contained in
jobResponse
or jobResponseStr
.
Supported values:
this
to mimic the builder pattern.public ByteBuffer getJobResponse()
responseEncoding
is
binary
public GetJobResponse setJobResponse(ByteBuffer jobResponse)
jobResponse
- The binary-encoded response of the job. This field
is populated only when the job has completed and
responseEncoding
is binary
this
to mimic the builder pattern.public String getJobResponseStr()
responseEncoding
is
json
public GetJobResponse setJobResponseStr(String jobResponseStr)
jobResponseStr
- The json-encoded response of the job. This field
is populated only when the job has completed and
responseEncoding
is json
this
to mimic the builder pattern.public Map<String,String> getStatusMap()
ERROR_MESSAGE
: Explains what error occurred while running the
job asynchronously. This entry only exists when the job status
is ERROR
.
public GetJobResponse setStatusMap(Map<String,String> statusMap)
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
.
this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2019. All rights reserved.