Package org.dspace.util
Class SolrUpgradePre6xStatistics
- java.lang.Object
-
- org.dspace.util.SolrUpgradePre6xStatistics
-
public class SolrUpgradePre6xStatistics extends Object
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
Fields Modifier and Type Field Description protected BitstreamServicebitstreamServiceprotected CollectionServicecollectionServiceprotected CommunityServicecommunityServiceprotected EPersonServiceepersonServiceprotected GroupServicegroupServiceprotected ItemServiceitemService
-
Constructor Summary
Constructors Constructor Description SolrUpgradePre6xStatistics(String indexName, int numRec, int batchSize)Construct the utility class from the command line options
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Entry point for command-line invocation
-
-
-
Field Detail
-
communityService
protected CommunityService communityService
-
collectionService
protected CollectionService collectionService
-
itemService
protected ItemService itemService
-
bitstreamService
protected BitstreamService bitstreamService
-
epersonService
protected EPersonService epersonService
-
groupService
protected GroupService groupService
-
-
Constructor Detail
-
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 Detail
-
main
public static void main(String[] args) throws org.apache.commons.cli.ParseException
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
-
-