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.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. The default value is an empty
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()
Map
.public CreateJobRequest setOptions(Map<String,String> options)
options
- Optional parameters. The default value is an empty
Map
.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 © 2020. All rights reserved.