public class CreateJobRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.createJob
.
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
.
Modifier and Type | Class and Description |
---|---|
static class |
CreateJobRequest.Options
A set of string constants for the
CreateJobRequest parameter
options . |
static class |
CreateJobRequest.RequestEncoding
A set of string constants for the
CreateJobRequest parameter
requestEncoding . |
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()
Binary-encoded payload for the job to be run asynchronously.
|
String |
getDataStr()
JSON-encoded payload for the job to be run asynchronously.
|
String |
getEndpoint()
Indicates which endpoint to execute, e.g.
|
Map<String,String> |
getOptions()
Optional parameters.
|
String |
getRequestEncoding()
The encoding of the request payload for the job.
|
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)
Binary-encoded payload for the job to be run asynchronously.
|
CreateJobRequest |
setDataStr(String dataStr)
JSON-encoded payload for the job to be run asynchronously.
|
CreateJobRequest |
setEndpoint(String endpoint)
Indicates which endpoint to execute, e.g.
|
CreateJobRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
CreateJobRequest |
setRequestEncoding(String requestEncoding)
The encoding of the request payload for the job.
|
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()
endpoint
.public CreateJobRequest setEndpoint(String endpoint)
endpoint
- The new value for endpoint
.this
to mimic the builder pattern.public String getRequestEncoding()
BINARY
.requestEncoding
.public CreateJobRequest setRequestEncoding(String requestEncoding)
BINARY
.requestEncoding
- The new value for requestEncoding
.this
to mimic the builder pattern.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
.data
.public CreateJobRequest setData(ByteBuffer data)
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
.data
- The new value for data
.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
.dataStr
.public CreateJobRequest setDataStr(String dataStr)
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
.dataStr
- The new value for dataStr
.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
.options
.public CreateJobRequest setOptions(Map<String,String> options)
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
.options
- The new value for options
.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 © 2025. All rights reserved.