Go to the source code of this file.
|
AS_EXTERN as_status | aerospike_job_info (aerospike *as, as_error *err, const as_policy_info *policy, const char *module, uint64_t job_id, bool stop_if_in_progress, as_job_info *info) |
|
AS_EXTERN as_status | aerospike_job_wait (aerospike *as, as_error *err, const as_policy_info *policy, const char *module, uint64_t job_id, uint32_t interval_ms) |
|
◆ as_job_status
The status of a particular background scan.
Enumerator |
---|
AS_JOB_STATUS_UNDEF | The job status is undefined. This is likely due to the status not being properly checked.
|
AS_JOB_STATUS_INPROGRESS | The job is currently running.
|
AS_JOB_STATUS_COMPLETED | The job completed successfully.
|
Definition at line 32 of file as_job.h.
◆ aerospike_job_info()
Check the progress of a background job running on the database. The status of the job running on the datatabse will be populated in as_job_info.
uint64_t job_id = 1234;
fprintf(stderr, "error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
}
else {
printf(
"Scan id=%ll, status=%d percent=%d", job_id, job_info.
status, job_info.
progress_pct);
}
AS_EXTERN as_status aerospike_scan_info(aerospike *as, as_error *err, const as_policy_info *policy, uint64_t scan_id, as_scan_info *info)
- Parameters
-
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
module | Background module. Values: scan | query |
job_id | Job ID. |
stop_if_in_progress | Stop querying nodes if background job is still running. |
info | Information about this background job, to be populated by this operation. |
- Returns
- AEROSPIKE_OK on success. Otherwise an error occurred.
◆ aerospike_job_wait()
Wait for a background job to be completed by servers.
uint64_t job_id = 1234;
AS_EXTERN as_status aerospike_job_wait(aerospike *as, as_error *err, const as_policy_info *policy, const char *module, uint64_t job_id, uint32_t interval_ms)
- Parameters
-
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
module | Background module. Values: scan | query |
job_id | Job ID. |
interval_ms | Polling interval in milliseconds. If zero, 1000 ms is used. |
- Returns
- AEROSPIKE_OK on success. Otherwise an error occurred.