Package org.dspace.util
Class SolrUpgradePre6xStatistics
java.lang.Object
org.dspace.util.SolrUpgradePre6xStatistics
CLI tool to upgrade legacy id references in SOLR statistics to DSpace 6 UUID's.
This command will need to be run iteratively over each statistics shard until all legacy id values have
been replaced.
If a legacy id cannot be resolved from the database, the id will remain unchanged.
"field:* AND NOT(field:*-*)" can be used to locate legacy ids
See DS-3602 for the origin of this issue. This code is targeted for inclusion in the DSpace 6.1 release.
Recommendation: for a large repository, run this command with -Xmx2000m if possible.
To process 1,000,000 statistics records, it took 60 min to complete.
- Author:
- Terry Brady, Georgetown University Library
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BitstreamServiceprotected CollectionServiceprotected CommunityServiceprotected EPersonServiceprotected GroupServiceprotected ItemService -
Constructor Summary
ConstructorsConstructorDescriptionSolrUpgradePre6xStatistics(String indexName, int numRec, int batchSize) Construct the utility class from the command line options -
Method Summary
-
Field Details
-
communityService
-
collectionService
-
itemService
-
bitstreamService
-
epersonService
-
groupService
-
-
Constructor Details
-
SolrUpgradePre6xStatistics
public SolrUpgradePre6xStatistics(String indexName, int numRec, int batchSize) throws org.apache.solr.client.solrj.SolrServerException, IOException Construct the utility class from the command line options- Parameters:
indexName- name of the statistics shard to updatenumRec- maximum number of records to processbatchSize- batch this many documents before updating.- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
-
Method Details
-
main
Entry point for command-line invocation- Parameters:
args- command-line arguments; see help for description- Throws:
org.apache.commons.cli.ParseException- if the command-line arguments cannot be parsed
-