This is an automated email from the ASF dual-hosted git repository.
rkk pushed a commit to branch SDAP-521
in repository https://gitbox.apache.org/repos/asf/sdap-nexus.git
The following commit(s) were added to refs/heads/SDAP-521 by this push:
new 8b422fa Removal of ingested test data
8b422fa is described below
commit 8b422fa307d4f01cb19e0fce940bcc7112b7ebc3
Author: rileykk <[email protected]>
AuthorDate: Fri Jul 5 11:25:28 2024 -0700
Removal of ingested test data
---
docs/test.rst | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/docs/test.rst b/docs/test.rst
index f4c2bbf..c1836f0 100644
--- a/docs/test.rst
+++ b/docs/test.rst
@@ -83,4 +83,30 @@ it has the required data ingested under the correct
collection names, otherwise
Cleanup
=======
-TBA
+If you would like to remove the test data ingested in this guide, use the
following steps to delete it.
+
+For the tile data itself, there's a tool for that exact purpose:
+
+.. code-block:: bash
+
+ cd ../tools/deletebyquery
+ pip install -r requirements.txt
+ # Run once for each dataset to avoid catching any other datasets with a
wildcard query
+ python deletebyquery.py --solr localhost:8983 --cassandra localhost
--cassandraUsername cassandra --cassandraPassword cassandra -q
'dataset_s:ASCATB-L2-Coastal_test'
+ python deletebyquery.py --solr localhost:8983 --cassandra localhost
--cassandraUsername cassandra --cassandraPassword cassandra -q
'dataset_s:VIIRS_NPP-2018_Heatwave_test'
+ python deletebyquery.py --solr localhost:8983 --cassandra localhost
--cassandraUsername cassandra --cassandraPassword cassandra -q
'dataset_s:OISSS_L4_multimission_7day_v1_test'
+ python deletebyquery.py --solr localhost:8983 --cassandra localhost
--cassandraUsername cassandra --cassandraPassword cassandra -q
'dataset_s:MUR25-JPL-L4-GLOB-v04.2_test'
+
+Unfortunately, this does not remove records of the datasets or ingested input
granules themselves, they need to be removed manually.
+
+.. code-block:: bash
+
+ curl -g 'http://localhost:8983/solr/nexusgranules/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:MUR25-JPL-L4-GLOB-v04.2_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusgranules/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:ASCATB-L2-Coastal_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusgranules/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:OISSS_L4_multimission_7day_v1_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusgranules/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:VIIRS_NPP-2018_Heatwave_test"}}'
+
+ curl -g 'http://localhost:8983/solr/nexusdatasets/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:MUR25-JPL-L4-GLOB-v04.2_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusdatasets/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:ASCATB-L2-Coastal_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusdatasets/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:OISSS_L4_multimission_7day_v1_test"}}'
+ curl -g 'http://localhost:8983/solr/nexusdatasets/update?commit=true' -H
'Content-Type: application/json' -d '{"delete": {"query":
"dataset_s:VIIRS_NPP-2018_Heatwave_test"}}'
\ No newline at end of file