Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0 release #152

Merged
merged 61 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
023e7a2
Added the hashstore dependency.
taojing2002 Jun 21, 2024
ab07a66
Added the storage interface and implementation.
taojing2002 Jun 22, 2024
3248f61
Removed the commented out code. Shortened the long statements.
taojing2002 Jun 24, 2024
ab0a721
Add a method to get the input stream of system metadata for an identi…
taojing2002 Jun 25, 2024
847b986
Change the call to get the system metadata.
taojing2002 Jun 25, 2024
e1e354f
Used the new method to get the system metadata.
taojing2002 Jun 25, 2024
186e739
Changed the code to get the system metadata.
taojing2002 Jun 25, 2024
ad2dd13
Use the hashstore method to get system metadata and object.
taojing2002 Jun 25, 2024
b193762
Removed a unused method.
taojing2002 Jun 26, 2024
c2b27cb
Deleted two unused methods.
taojing2002 Jun 26, 2024
f1441b6
Added a save method for the test classes.
taojing2002 Jun 26, 2024
e643ae4
Added the hastore properties.
taojing2002 Jun 26, 2024
03ed1ba
Added the code to store objects into hash store.
taojing2002 Jun 26, 2024
32bec87
Added the method to store system metadata. This method is only for th…
taojing2002 Jun 26, 2024
d4b7089
Added the code to put the objects and system metadata into hashstore.
taojing2002 Jun 26, 2024
f810a6d
Modified the ObjectManagerTest class to use the new methods.
taojing2002 Jun 27, 2024
8d0f359
Removed the object path in the messages of rabitmq.
taojing2002 Jun 28, 2024
968c930
add mvn deploy sections
artntek Jul 31, 2024
2c66f94
Merge pull request #123 from DataONEorg/feature-120-prep-3.0.2-release
artntek Jul 31, 2024
1a0355a
Modified the code based on the reviewer's suggestion.
taojing2002 Aug 12, 2024
4d68259
Deleted the StorageFactory class and the Storage interface.
taojing2002 Aug 12, 2024
48c63a4
Modified the code based on the change on the storage class.
taojing2002 Aug 12, 2024
ea064aa
Merge branch 'develop' into feature-105-hashstore
taojing2002 Aug 12, 2024
3af3f88
Merge branch 'feature-105-hashstore' of https://github.com/dataoneorg…
taojing2002 Aug 12, 2024
9bc801c
Made changes based on the viewer's suggestion.
taojing2002 Aug 14, 2024
408a5c4
Merge pull request #117 from DataONEorg/feature-105-hashstore
taojing2002 Aug 30, 2024
9efce83
Upgrade commons-utilbeans, commons-collections and h2.
taojing2002 Sep 18, 2024
57cf6e9
Upgrade json-smart.
taojing2002 Sep 18, 2024
4667ef9
Upgraded log4j-1.2-api to 2.24.0.
taojing2002 Sep 19, 2024
73639e2
Bump slf4j-api to 2.0.16.
taojing2002 Sep 20, 2024
8267a71
Bump the commons-lang3 to 3.17.0.
taojing2002 Sep 20, 2024
7e4f452
upgrade spring-data-commons to 3.4.5.
taojing2002 Sep 20, 2024
b035a2a
Bump the maven plugin versions.
taojing2002 Sep 24, 2024
c988762
Bump log4j-jcl version.
taojing2002 Sep 24, 2024
95155c2
Bump jackson-annotations version.
taojing2002 Sep 24, 2024
0628ef2
Merge pull request #136 from DataONEorg/bug-upgrade-dependency
taojing2002 Sep 24, 2024
0bfde6c
Upgrade the spring library to the newest version of 5 series, which w…
taojing2002 Sep 25, 2024
3ea5505
Bump maven-clean-plugin version to 3.4.0.
taojing2002 Sep 26, 2024
bc0d6a8
Merge pull request #139 from DataONEorg/bug-upgrade-dependency
taojing2002 Oct 3, 2024
4efebcb
bump to version 3.1.0-SNAPSHOT
artntek Oct 21, 2024
5f5198a
fix deprecated code
artntek Oct 21, 2024
596f943
update base image to eclipse-temurin:17.0.12_7-jre-jammy
artntek Oct 21, 2024
658cdc2
bump versions to snapshot
artntek Oct 21, 2024
e42427a
Merge pull request #145 from DataONEorg/feature-112-docker-img-upgrade
artntek Oct 21, 2024
9d13c2a
Merge pull request #144 from DataONEorg/feature-141-3.1.0-release-prep
artntek Oct 21, 2024
439293e
add snapshot to chart version for testing
artntek Oct 21, 2024
c21bd1a
Merge pull request #146 from DataONEorg/feature-141-3.1.0-release-prep
artntek Oct 21, 2024
99cac86
fix incorrect relpath
artntek Oct 22, 2024
77911db
Upgrade log4j-core to 2.24.0 to fix a bug that a method can't be foun…
taojing2002 Oct 25, 2024
3750303
Merge pull request #147 from DataONEorg/bug-upgrade-dependency
taojing2002 Oct 25, 2024
0cb65b1
Change the method setXmlNamespaceConfig from static to non-static. Th…
taojing2002 Oct 28, 2024
85f28eb
Merge branch 'develop' into feature-141-3.1.0-release-prep
artntek Oct 28, 2024
812df9a
trying to fix indexer crash in k8s with 3.1.0 code
artntek Oct 28, 2024
e528ada
Merge pull request #148 from DataONEorg/feature-141-3.1.0-release-prep
artntek Oct 28, 2024
10b431c
update hashstore version to 1.1.0
artntek Nov 21, 2024
69693fa
Merge branch 'develop' into feature-141-3.1.0-release-prep
artntek Nov 21, 2024
85862b7
Merge pull request #150 from DataONEorg/feature-141-3.1.0-release-prep
artntek Nov 21, 2024
9a77c51
bump version to 3.1.0
artntek Nov 21, 2024
c679f5d
update release notes. Update version in pom
artntek Nov 21, 2024
d2e1281
update versions in helm chart yaml
artntek Nov 21, 2024
e2a9215
Merge pull request #151 from DataONEorg/feature-141-3.1.0-release-prep
artntek Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# dataone-indexer Release Notes

## dataone-indexer version 3.1.0 & helm chart version 1.1.0

* Release date: 2024-11-21
* dataone-indexer version 3.1.0
* Integrate with the new Dataone hash-based storage library
[`hashstore-java`](https://github.com/DataONEorg/hashstore-java).
* Indexer no longer needs access to an aut token in order to index private datasets.
* Update Docker base image to eclipse-temurin:17.0.12_7-jre-jammy
* Upgrade log4j-core to 2.24.0 to fix "method can't be found" issue
* Bump dependencies:
* org.apache.commons:commons-lang3 from 3.4 to 3.17.0
* org.slf4j:slf4j-api from 1.7.36 to 2.0.16
* org.springframework.data:spring-data-commons from 1.6.5.RELEASE to 3.3.4
* org.apache.maven.plugins:maven-compiler-plugin from 2.0.1 to 3.13.0
* com.coderplus.maven.plugins:copy-rename-maven-plugin from 1.0 to 1.0.1
* org.apache.logging.log4j:log4j-jcl from 2.17.1 to 2.24.0
* org.apache.maven.plugins:maven-clean-plugin from 3.2.0 to 3.4.0
* com.fasterxml.jackson.core:jackson-annotations from 2.13.3 to 2.18.0
* helm chart version 1.0.2
* Bump Application version to 3.1.0
* Add `storage` to values.yaml for new hashstore integration

## dataone-indexer version 3.0.2 & helm chart version 1.0.2

* Release date: 2024-07-29
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# `nerdctl build -t dataone-index-worker:2.4.0 -f docker/Dockerfile --build-arg TAG=2.4.0 .`
# Use an OpenJDK runtime as a parent image
# Note: the prior alpine-based openjdk image had network DNS issues, so replacing with Eclipse Temurin
FROM eclipse-temurin:17.0.8.1_1-jre-jammy
FROM eclipse-temurin:17.0.12_7-jre-jammy

ARG TAG=3.0.0-SNAPSHOT
ENV TAG=${TAG}
Expand All @@ -23,7 +23,7 @@ RUN groupadd -g 1000 d1indexer && useradd -u 1000 -g 1000 d1indexer \

# The most recently built jar file is copied from the maven build directory to this dir by maven, so that
# it can be copied to the image.
COPY ../target/dataone-index-worker-${TAG}-shaded.jar .
COPY ./target/dataone-index-worker-${TAG}-shaded.jar .
COPY ./docker/entrypoint.sh .

# Change the ownership of the jar and sh files
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.2
version: "1.1.0"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "3.0.2"
appVersion: "3.1.0"

# Chart dependencies
dependencies:
Expand Down
9 changes: 9 additions & 0 deletions helm/config/dataone-indexer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ index.resourcemap.waitingComponent.time={{ default 800 .Values.idxworker.resourc
index.resourcemap.waitingComponent.max.attempts={{ default 25 .Values.idxworker.resourcemapMaxTries }}
index.solr.versionConflict.waiting.time={{ default 1000 .Values.idxworker.solrVerConflictWaitMs }}
index.solr.versionConflict.max.attempts={{ default 50 .Values.idxworker.solrVerConflictMaxTries }}

# Storage properties
storage.className={{ default "org.dataone.hashstore.filehashstore.FileHashStore" .Values.idxworker.storage.hashStoreClassName }}
storage.hashstore.rootDirectory={{ default "/var/metacat/hashstore" .Values.idxworker.storage.hashStoreRootDir }}
storage.hashstore.defaultNamespace={{ default "https://ns.dataone.org/service/types/v2.0#SystemMetadata" .Values.idxworker.storage.hashStoreDefaultNamespace }}
# The following three properties must NOT be modified after the hash store is initialized
storage.hashstore.fileNameAlgorithm={{ default "SHA-256" .Values.idxworker.storage.hashStoreAlgorithm }}
storage.hashstore.directory.width={{ default 2 .Values.idxworker.storage.hashStoreDirWidth }}
storage.hashstore.directory.depth={{ default 3 .Values.idxworker.storage.hashStoreDirDepth }}
28 changes: 25 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,23 @@ global:
## @section Dataone-Indexer Application-Specific Properties

image:
## @param image.repository repository that the image will be pulled from
##
repository: ghcr.io/dataoneorg/dataone-index-worker

## @param image.pullPolicy image pull policy - Always, Never, or IfNotPresent
##
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
#tag: ""

## @param image.tag Overrides the image tag. Will default to the chart appVersion if set to ""
##
tag: ""

## @param image.debug Specify if container debugging should be enabled (sets log level to "DEBUG")
## Set to true if you would like to see extra information in metacat/tomcat logs.
## * * WARNING - FOR TESTING ONLY! * * May result in secrets being printed to logs in plain text.
##
debug: false

imagePullSecrets: []

Expand Down Expand Up @@ -181,6 +194,15 @@ idxworker:
##
tripleDbDirectory: /etc/dataone/tdb-cache

storage:
hashStoreClassName: "org.dataone.hashstore.filehashstore.FileHashStore"
hashStoreRootDir: "/var/metacat/hashstore"
hashStoreDefaultNamespace: "https://ns.dataone.org/service/types/v2.0#SystemMetadata"
# The following three properties must NOT be modified after the hashstore is initialized
hashStoreAlgorithm: "SHA-256"
hashStoreDirWidth: 2
hashStoreDirDepth: 3

## @section RabbitMQ Bitnami Sub-Chart Configuration
##
rabbitmq:
Expand All @@ -200,7 +222,7 @@ rabbitmq:
## @param rabbitmq.existingPasswordSecret the k8s secret holding the rabbitmq password
## (must be associated with key: 'rabbitmq-password')
##
existingPasswordSecret: ""
existingPasswordSecret: "ssss"


## @section Solr Bitnami Sub-Chart Configuration
Expand Down
85 changes: 67 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.dataone</groupId>
<artifactId>dataone-index-worker</artifactId>
<version>3.0.2</version>
<version>3.1.0</version>
<packaging>jar</packaging>
<name>dataone-index-worker</name>
<url>http://maven.apache.org</url>
Expand All @@ -12,7 +12,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>5.3.33</spring.version>
<spring.version>5.3.39</spring.version>
<d1_libclient_java.version>2.3.1</d1_libclient_java.version>
<solr.version>8.11.2</solr.version>
<solr.test.home>solr8home</solr.test.home>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -79,6 +79,18 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
Expand All @@ -91,18 +103,30 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.163</version>
<version>2.3.232</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -128,12 +152,12 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.4.5.RELEASE</version>
<version>3.3.4</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.6.5.RELEASE</version>
<version>3.3.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -188,12 +212,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -209,7 +233,7 @@
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>1.0.9</version>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
Expand All @@ -229,7 +253,7 @@
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>ch.hsr</groupId>
Expand All @@ -254,17 +278,17 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.17.1</version>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>2.17.1</version>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
Expand All @@ -274,7 +298,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.13.3</version>
<version>2.17.2</version>
</dependency>
<!-- API, java.xml.bind module -->
<dependency>
Expand All @@ -288,12 +312,17 @@
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.dataone</groupId>
<artifactId>hashstore</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.0</version>
<configuration>
<filesets>
<fileset>
Expand All @@ -318,7 +347,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
Expand Down Expand Up @@ -398,7 +427,7 @@
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<version>1.0.1</version>
<executions>
<execution>
<id>copy-file</id>
Expand Down Expand Up @@ -430,6 +459,15 @@
</includes>
</resource>
</resources>

<extensions>
<!-- Enabling the use of SSH; see `<distributionManagement>` section -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>3.5.3</version>
</extension>
</extensions>
</build>
<scm>
<url>https://repository.dataone.org/software/cicore</url>
Expand All @@ -443,4 +481,15 @@
<url>LICENSE.txt</url>
</license>
</licenses>
<!-- Config for mvn deploy to upload to repo. Also see `<build><extensions>` section -->
<!-- Also requires authentication info in ~/.m2/settings.xml; -->
<!-- see: https://maven.apache.org/guides/mini/guide-deployment-security-settings.html -->
<!-- ...but note pvt key location should be an absolute path (/home/myname/...), NOT ~/... -->
<distributionManagement>
<repository>
<id>dataone.org</id>
<name>DataONE Repository</name>
<url>scpexe://maven.dataone.org/var/www/maven</url>
</repository>
</distributionManagement>
</project>
7 changes: 2 additions & 5 deletions src/main/java/org/dataone/cn/indexer/IndexWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,23 +427,21 @@ private void indexObject(IndexQueueMessageParser parser, boolean multipleThread)
Identifier pid = parser.getIdentifier();
String indexType = parser.getIndexType();
int priority = parser.getPriority();
String finalFilePath = parser.getObjectPath();
try {
long threadId = Thread.currentThread().getId();
logger.info("IndexWorker.consumer.indexObject by multiple thread? " + multipleThread
+ ", with the thread id " + threadId
+ " - Received the index task from the index queue with the identifier: "
+ pid.getValue() + " , the index type: " + indexType
+ ", the file path (null means not to have): " + finalFilePath
+ ", the priority: " + priority);
switch (indexType) {
case CREATE_INDEXT_TYPE -> {
boolean sysmetaOnly = false;
solrIndex.update(pid, finalFilePath, sysmetaOnly);
solrIndex.update(pid, sysmetaOnly);
}
case SYSMETA_CHANGE_TYPE -> {
boolean sysmetaOnly = true;
solrIndex.update(pid, finalFilePath, sysmetaOnly);
solrIndex.update(pid, sysmetaOnly);
}
case DELETE_INDEX_TYPE -> solrIndex.remove(pid);
default -> throw new InvalidRequest(
Expand All @@ -455,7 +453,6 @@ private void indexObject(IndexQueueMessageParser parser, boolean multipleThread)
logger.info("IndexWorker.indexOjbect with the thread id " + threadId
+ " - Completed the index task from the index queue with the identifier: "
+ pid.getValue() + " , the index type: " + indexType
+ ", the file path (null means not to have): " + finalFilePath
+ ", the priority: " + priority + " and the time taking is "
+ (end - start) + " milliseconds");

Expand Down
Loading
Loading