- Increase the "PublicationsRetriever.threadsMultiplier" to "6", as the threads are mostly network-blocked.

- Make sure the "maven" package is installed before compiling the "PublicationsRetriever" library.
- Update dependencies.
This commit is contained in:
Lampros Smyrnaios 2021-11-30 01:02:06 +02:00
parent 045788c728
commit 6355b3e397
4 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
plugins {
id 'org.springframework.boot' version '2.6.0'
id 'org.springframework.boot' version '2.6.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -25,7 +25,7 @@ if [[ ! -f $inputDataFile ]]; then
echo -e "\n\n"
fi
gradleVersion="7.2"
gradleVersion="7.3"
if [[ justInstall -eq 0 ]]; then
@ -39,7 +39,7 @@ if [[ justInstall -eq 0 ]]; then
# Keep a backup of the existing JAR file.
mv ./publications_retriever-1.0-SNAPSHOT.jar ./publications_retriever-1.0-SNAPSHOT_BACKUP.jar
cd PublicationsRetriever && mvn clean install
cd PublicationsRetriever && sudo apt install -y maven && mvn clean install
# Copy the created JAR file to the top libs directory.
cp target/publications_retriever-1.0-SNAPSHOT.jar ../publications_retriever-1.0-SNAPSHOT.jar

View File

@ -42,6 +42,7 @@ public class PublicationsRetrieverPlugin {
PublicationsRetriever.targetUrlType = "docUrl";
FileUtils.jsonBatchSize = WorkerConstants.ASSIGNMENTS_LIMIT;
PublicationsRetriever.threadsMultiplier = 6;
int workerThreadsCount = Runtime.getRuntime().availableProcessors() * PublicationsRetriever.threadsMultiplier;
logger.info("Use " + workerThreadsCount + " worker-threads.");
PublicationsRetriever.executor = Executors.newFixedThreadPool(workerThreadsCount);