public class CreateJobRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.createJob(CreateJobRequest).
Create a job which will run asynchronously. The response returns a job ID,
which can be used to query the status and result of the job. The status and
the result of the job upon completion can be requested by GPUdb.getJob(GetJobRequest).
| Modifier and Type | Class and Description |
|---|---|
static class |
CreateJobRequest.Options
Optional parameters.
|
static class |
CreateJobRequest.RequestEncoding
The encoding of the request payload for the job.
|
| Constructor and Description |
|---|
CreateJobRequest()
Constructs a CreateJobRequest object with default parameters.
|
CreateJobRequest(String endpoint,
String requestEncoding,
ByteBuffer data,
String dataStr,
Map<String,String> options)
Constructs a CreateJobRequest object with the specified 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.
|
ByteBuffer |
getData() |
String |
getDataStr() |
String |
getEndpoint() |
Map<String,String> |
getOptions() |
String |
getRequestEncoding() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
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.
|
CreateJobRequest |
setData(ByteBuffer data) |
CreateJobRequest |
setDataStr(String dataStr) |
CreateJobRequest |
setEndpoint(String endpoint) |
CreateJobRequest |
setOptions(Map<String,String> options) |
CreateJobRequest |
setRequestEncoding(String requestEncoding) |
String |
toString() |
public CreateJobRequest()
public CreateJobRequest(String endpoint, String requestEncoding, ByteBuffer data, String dataStr, Map<String,String> options)
endpoint - Indicates which endpoint to execute, e.g.
'/alter/table'.requestEncoding - The encoding of the request payload for the job.
Supported values:
The default value is BINARY.data - Binary-encoded payload for the job to be run
asynchronously. The payload must contain the relevant
input parameters for the endpoint indicated in endpoint. Please see the documentation for the
appropriate endpoint to see what values must (or can) be
specified. If this parameter is used, then requestEncoding must be binary or snappy.dataStr - JSON-encoded payload for the job to be run
asynchronously. The payload must contain the relevant
input parameters for the endpoint indicated in endpoint. Please see the documentation for the
appropriate endpoint to see what values must (or can) be
specified. If this parameter is used, then requestEncoding must be json.options - Optional parameters.
REMOVE_JOB_ON_COMPLETE:
Supported values:
JOB_TAG: Tag to use for submitted job. The same tag
could be used on backup cluster to retrieve response for
the job. Tags can use letter, numbers, '_' and '-'
Map.public static org.apache.avro.Schema getClassSchema()
public String getEndpoint()
public CreateJobRequest setEndpoint(String endpoint)
endpoint - Indicates which endpoint to execute, e.g.
'/alter/table'.this to mimic the builder pattern.public String getRequestEncoding()
public CreateJobRequest setRequestEncoding(String requestEncoding)
public ByteBuffer getData()
endpoint. Please see the
documentation for the appropriate endpoint to see what values
must (or can) be specified. If this parameter is used, then
requestEncoding must be binary or snappy.public CreateJobRequest setData(ByteBuffer data)
data - Binary-encoded payload for the job to be run
asynchronously. The payload must contain the relevant
input parameters for the endpoint indicated in endpoint. Please see the documentation for the
appropriate endpoint to see what values must (or can) be
specified. If this parameter is used, then requestEncoding must be binary or snappy.this to mimic the builder pattern.public String getDataStr()
endpoint. Please see the
documentation for the appropriate endpoint to see what values
must (or can) be specified. If this parameter is used, then
requestEncoding must be json.public CreateJobRequest setDataStr(String dataStr)
dataStr - JSON-encoded payload for the job to be run
asynchronously. The payload must contain the relevant
input parameters for the endpoint indicated in endpoint. Please see the documentation for the
appropriate endpoint to see what values must (or can) be
specified. If this parameter is used, then requestEncoding must be json.this to mimic the builder pattern.public Map<String,String> getOptions()
REMOVE_JOB_ON_COMPLETE:
Supported values:
JOB_TAG:
Tag to use for submitted job. The same tag could be used on
backup cluster to retrieve response for the job. Tags can use
letter, numbers, '_' and '-'
Map.public CreateJobRequest setOptions(Map<String,String> options)
options - Optional parameters.
REMOVE_JOB_ON_COMPLETE:
Supported values:
JOB_TAG: Tag to use for submitted job. The same tag
could be used on backup cluster to retrieve response for
the job. Tags can use letter, numbers, '_' and '-'
Map.this to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainerpublic Object get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to getIndexOutOfBoundsExceptionpublic void put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to setvalue - the value to setIndexOutOfBoundsExceptionCopyright © 2024. All rights reserved.