Skip to content

Commit 55f8a5b

Browse files
committed
[CLIENT-2219] Remove deprecated client.scan_info()
1 parent 17e9834 commit 55f8a5b

File tree

8 files changed

+0
-309
lines changed

8 files changed

+0
-309
lines changed

aerospike-stubs/aerospike.pyi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ REGEX_ICASE: int
281281
REGEX_NEWLINE: int
282282
REGEX_NONE: int
283283
REGEX_NOSUB: int
284-
SCAN_STATUS_ABORTED: int
285-
SCAN_STATUS_COMPLETED: int
286-
SCAN_STATUS_INPROGRESS: int
287-
SCAN_STATUS_UNDEF: int
288284
SERIALIZER_JSON: int
289285
SERIALIZER_NONE: int
290286
SERIALIZER_PYTHON: int
@@ -411,7 +407,6 @@ class Client:
411407
def remove_bin(self, key: tuple, list: list, meta: dict = ..., policy: dict = ...) -> None: ...
412408
def scan(self, namespace: str, set: str = ...) -> Scan: ...
413409
def scan_apply(self, ns: str, set: str, module: str, function: str, args: list = ..., policy: dict = ..., options: dict = ...) -> int: ...
414-
def scan_info(self, scan_id: int) -> dict: ...
415410
def select(self, *args, **kwargs) -> tuple: ...
416411
def select_many(self, keys: list, bins: list, policy: dict = ...) -> list: ...
417412
def set_xdr_filter(self, data_center: str, namespace: str, expression_filter, policy: dict = ...) -> str: ...

doc/aerospike.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -897,33 +897,6 @@ Specifies the type of authentication to be used when communicating with the serv
897897
.. warning::
898898
This mode should only be used for testing purposes because it is not secure authentication.
899899
900-
.. _aerospike_scan_constants:
901-
902-
Scan Constants
903-
--------------
904-
905-
.. data:: SCAN_STATUS_ABORTED
906-
907-
.. deprecated:: 1.0.50
908-
used by :meth:`Client.scan_info`
909-
910-
.. data:: SCAN_STATUS_COMPLETED
911-
912-
.. deprecated:: 1.0.50
913-
used by :meth:`Client.scan_info`
914-
915-
.. data:: SCAN_STATUS_INPROGRESS
916-
917-
.. deprecated:: 1.0.50
918-
used by :meth:`Client.scan_info`
919-
920-
.. data:: SCAN_STATUS_UNDEF
921-
922-
.. deprecated:: 1.0.50
923-
used by :meth:`Client.scan_info`
924-
925-
.. versionadded:: 1.0.39
926-
927900
.. _aerospike_job_constants:
928901
929902
Job Constants

doc/client.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -693,24 +693,6 @@ User Defined Functions
693693
:returns: :class:`dict`
694694
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.
695695

696-
.. method:: scan_info(scan_id) -> dict
697-
698-
.. deprecated:: 1.0.50
699-
Use :meth:`job_info` instead.
700-
701-
Return the status of a scan running in the background.
702-
703-
704-
The returned :class:`dict` contains these keys:
705-
706-
* ``"status"``: see :ref:`aerospike_scan_constants` for possible values.
707-
* ``"records_scanned"``: number of scanned records.
708-
* ``"progress_pct"``: progress percentage of the job
709-
710-
:param int scan_id: the scan ID returned by :meth:`scan_apply`.
711-
:returns: :class:`dict`
712-
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.
713-
714696
.. index::
715697
single: Info Operations
716698

examples/client/scan_info.py

Lines changed: 0 additions & 158 deletions
This file was deleted.

src/include/client.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ AerospikeScan *AerospikeClient_Scan(AerospikeClient *self, PyObject *args,
250250
PyObject *kwds);
251251
PyObject *AerospikeClient_ScanApply(AerospikeClient *self, PyObject *args,
252252
PyObject *kwds);
253-
PyObject *AerospikeClient_ScanInfo(AerospikeClient *self, PyObject *args,
254-
PyObject *kwds);
255253

256254
/*******************************************************************************
257255
* QUERY OPERATIONS

src/main/client/scan.c

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -283,91 +283,3 @@ PyObject *AerospikeClient_ScanApply(AerospikeClient *self, PyObject *args,
283283
py_function, py_args, py_policy,
284284
py_options, true);
285285
}
286-
287-
/**
288-
*******************************************************************************************************
289-
* Gets the status of a background scan triggered by scanApply()
290-
*
291-
* @param self AerospikeClient object
292-
* @param args The args is a tuple object containing an argument
293-
* list passed from Python to a C function
294-
* @param kwds Dictionary of keywords
295-
*
296-
* Returns status of the background scan returned as a tuple containing
297-
* progress_pct, records_scanned, status.
298-
*******************************************************************************************************
299-
*/
300-
PyObject *AerospikeClient_ScanInfo(AerospikeClient *self, PyObject *args,
301-
PyObject *kwds)
302-
{
303-
// Initialize error
304-
as_error err;
305-
as_error_init(&err);
306-
307-
// Python Function Arguments
308-
PyObject *py_policy = NULL;
309-
PyObject *retObj = PyDict_New();
310-
311-
long lscanId = 0;
312-
313-
as_policy_info info_policy;
314-
as_policy_info *info_policy_p = NULL;
315-
as_scan_info scan_info;
316-
317-
// Python Function Keyword Arguments
318-
static char *kwlist[] = {"scanid", "policy", NULL};
319-
320-
// Python Function Argument Parsing
321-
if (PyArg_ParseTupleAndKeywords(args, kwds, "l|O:scan_info", kwlist,
322-
&lscanId, &py_policy) == false) {
323-
return NULL;
324-
}
325-
326-
if (!self || !self->as) {
327-
as_error_update(&err, AEROSPIKE_ERR_PARAM, "Invalid aerospike object");
328-
goto CLEANUP;
329-
}
330-
331-
if (!self->is_conn_16) {
332-
as_error_update(&err, AEROSPIKE_ERR_CLUSTER,
333-
"No connection to aerospike cluster");
334-
goto CLEANUP;
335-
}
336-
337-
// Convert python object to policy_info
338-
pyobject_to_policy_info(&err, py_policy, &info_policy, &info_policy_p,
339-
&self->as->config.policies.info);
340-
if (err.code != AEROSPIKE_OK) {
341-
goto CLEANUP;
342-
}
343-
344-
Py_BEGIN_ALLOW_THREADS
345-
aerospike_scan_info(self->as, &err, info_policy_p, lscanId, &scan_info);
346-
Py_END_ALLOW_THREADS
347-
348-
if (err.code != AEROSPIKE_OK) {
349-
goto CLEANUP;
350-
}
351-
352-
if (retObj) {
353-
PyObject *py_longobject = NULL;
354-
py_longobject = PyLong_FromLong(scan_info.progress_pct);
355-
PyDict_SetItemString(retObj, PROGRESS_PCT, py_longobject);
356-
Py_DECREF(py_longobject);
357-
py_longobject = PyLong_FromLong(scan_info.records_scanned);
358-
PyDict_SetItemString(retObj, RECORDS_SCANNED, py_longobject);
359-
Py_DECREF(py_longobject);
360-
py_longobject = PyLong_FromLong(scan_info.status);
361-
PyDict_SetItemString(retObj, STATUS, py_longobject);
362-
Py_DECREF(py_longobject);
363-
}
364-
365-
CLEANUP:
366-
367-
if (err.code != AEROSPIKE_OK) {
368-
raise_exception(&err);
369-
return NULL;
370-
}
371-
372-
return retObj;
373-
}

src/main/client/type.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ PyDoc_STRVAR(
163163
\n\
164164
Initiate a background scan and apply a record UDF to each record matched by the scan.");
165165

166-
PyDoc_STRVAR(scan_info_doc, "scan_info(scan_id) -> dict\n\
167-
\n\
168-
Return the status of a scan running in the background.");
169-
170166
PyDoc_STRVAR(info_doc, "info(command[, hosts[, policy]]) -> {}\n\
171167
\n\
172168
Send an info command to multiple nodes specified in a hosts list.");
@@ -460,9 +456,6 @@ static PyMethodDef AerospikeClient_Type_Methods[] = {
460456
{"scan_apply", (PyCFunction)AerospikeClient_ScanApply,
461457
METH_VARARGS | METH_KEYWORDS, scan_apply_doc},
462458

463-
{"scan_info", (PyCFunction)AerospikeClient_ScanInfo,
464-
METH_VARARGS | METH_KEYWORDS, scan_info_doc},
465-
466459
// INFO OPERATIONS
467460

468461
{"info", (PyCFunction)AerospikeClient_Info, METH_VARARGS | METH_KEYWORDS,

src/main/policy.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ static AerospikeConstants aerospike_constants[] = {
138138
{AS_POLICY_GEN_IGNORE, "POLICY_GEN_IGNORE"},
139139
{AS_POLICY_GEN_EQ, "POLICY_GEN_EQ"},
140140
{AS_POLICY_GEN_GT, "POLICY_GEN_GT"},
141-
{AS_SCAN_STATUS_COMPLETED, "SCAN_STATUS_COMPLETED"},
142-
{AS_SCAN_STATUS_ABORTED, "SCAN_STATUS_ABORTED"},
143-
{AS_SCAN_STATUS_UNDEF, "SCAN_STATUS_UNDEF"},
144-
{AS_SCAN_STATUS_INPROGRESS, "SCAN_STATUS_INPROGRESS"},
145141
{AS_JOB_STATUS_COMPLETED, "JOB_STATUS_COMPLETED"},
146142
{AS_JOB_STATUS_UNDEF, "JOB_STATUS_UNDEF"},
147143
{AS_JOB_STATUS_INPROGRESS, "JOB_STATUS_INPROGRESS"},

0 commit comments

Comments
 (0)