Skip to main content
Source

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 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 request_encoding must 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 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 request_encoding must be json.
Source

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 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 request_encoding must 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 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 request_encoding must be json.
  • options - The optional parameters; any left unset take the server’s defaults.

Sends a pre-built CreateJobRequest to the /create/job endpoint.

Sends a pre-built CreateJobRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.