pub async fn create_job( &self, endpoint: String, request_encoding: String, data: ByteBuf, data_str: String, ) -> Result<CreateJobResponse, KineticaError>
Create a new job to be executed asynchronously
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 /get/job.
endpoint- Indicates which endpoint to execute, e.g. ‘/alter/table’.request_encoding- The encoding of the request payload for the job.data- Binary-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated inendpoint. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, thenrequest_encodingmust be binary or snappy.data_str- JSON-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated inendpoint. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, thenrequest_encodingmust be json.
pub async fn create_job_with_opts( &self, endpoint: String, request_encoding: String, data: ByteBuf, data_str: String, options: CreateJobRequestOptions, ) -> Result<CreateJobResponse, KineticaError>
Create a new job to be executed asynchronously
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 /get/job.
endpoint- Indicates which endpoint to execute, e.g. ‘/alter/table’.request_encoding- The encoding of the request payload for the job.data- Binary-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated inendpoint. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, thenrequest_encodingmust be binary or snappy.data_str- JSON-encoded payload for the job to be run asynchronously. The payload must contain the relevant input parameters for the endpoint indicated inendpoint. Please see the documentation for the appropriate endpoint to see what values must (or can) be specified. If this parameter is used, thenrequest_encodingmust be json.options- The optional parameters; any left unset take the server’s defaults.
pub async fn create_job_raw( &self, request: &CreateJobRequest, ) -> Result<CreateJobResponse, KineticaError>
Sends a pre-built CreateJobRequest to the /create/job endpoint.
pub async fn create_job_from_url( &self, url: &str, request: &CreateJobRequest, ) -> Result<CreateJobResponse, KineticaError>
Sends a pre-built CreateJobRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.