diff --git a/database-manipulation-tool-schema/pom.xml b/database-manipulation-tool-schema/pom.xml
index 8794678..81d3f2a 100644
--- a/database-manipulation-tool-schema/pom.xml
+++ b/database-manipulation-tool-schema/pom.xml
@@ -50,9 +50,9 @@
UTF-8
- 17
- 17
- 17
+ 21
+ 21
+ 21
diff --git a/database-manipulation-tool/README.md b/database-manipulation-tool/README.md
index 936af68..05f0831 100644
--- a/database-manipulation-tool/README.md
+++ b/database-manipulation-tool/README.md
@@ -96,7 +96,7 @@ You can reset all databases on DMT start with property `onstart.reset.database`.
POST
/Main/GenerateBatchLoad?count={count}&maxRows={maxRows}
(Same as GenerateLoad but uses batch statements for better performance)
- GET
+ POST
/Redis/pollMessages?max=5
[
@@ -107,7 +107,7 @@ You can reset all databases on DMT start with property `onstart.reset.database`.
Reads at most 'max' messages from specified channels
- GET
+ POST
/Redis/sendMessage?channel=channel1
{
@@ -123,6 +123,11 @@ You can reset all databases on DMT start with property `onstart.reset.database`.
/Redis/reset
Flush whole Redis instance
+
+ GET
+ /Redis/readHash?hashKey=hash1
+ Returns all messages stored under 'hashKey'
+
## Running the application in dev mode
diff --git a/database-manipulation-tool/pom.xml b/database-manipulation-tool/pom.xml
index 1c8909f..3b371bc 100644
--- a/database-manipulation-tool/pom.xml
+++ b/database-manipulation-tool/pom.xml
@@ -48,8 +48,8 @@
3.11.0
- 17
- 17
+ 21
+ 21
UTF-8
UTF-8
quarkus-bom
diff --git a/database-manipulation-tool/src/main/docker/Dockerfile.jvm b/database-manipulation-tool/src/main/docker/Dockerfile.jvm
index 79af6dd..6b38c12 100644
--- a/database-manipulation-tool/src/main/docker/Dockerfile.jvm
+++ b/database-manipulation-tool/src/main/docker/Dockerfile.jvm
@@ -75,7 +75,7 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
-FROM registry.access.redhat.com/ubi8/openjdk-17:1.14
+FROM registry.access.redhat.com/ubi8/openjdk-21:1.20-3
ENV LANGUAGE='en_US:en'
diff --git a/database-manipulation-tool/src/main/docker/Dockerfile.legacy-jar b/database-manipulation-tool/src/main/docker/Dockerfile.legacy-jar
index 50f0aef..3fd965f 100644
--- a/database-manipulation-tool/src/main/docker/Dockerfile.legacy-jar
+++ b/database-manipulation-tool/src/main/docker/Dockerfile.legacy-jar
@@ -75,7 +75,7 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
-FROM registry.access.redhat.com/ubi8/openjdk-17:1.14
+FROM registry.access.redhat.com/ubi8/openjdk-21:1.20-3
ENV LANGUAGE='en_US:en'
diff --git a/database-manipulation-tool/src/main/java/io/skodjob/dmt/resource/RedisResource.java b/database-manipulation-tool/src/main/java/io/skodjob/dmt/resource/RedisResource.java
index ef3dc4a..d3053a4 100644
--- a/database-manipulation-tool/src/main/java/io/skodjob/dmt/resource/RedisResource.java
+++ b/database-manipulation-tool/src/main/java/io/skodjob/dmt/resource/RedisResource.java
@@ -33,6 +33,7 @@
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.skodjob.dmt.service.RedisService;
@@ -66,12 +67,22 @@ public Response sendMessage(@QueryParam("channel") String channel, Map channels) {
List>> res = redisService.get(max, channels);
return Response.ok(res).build();
}
+ @Path("readHash")
+ @GET
+ public Response readHash(@QueryParam("hashKey") String hashKey) {
+ Map map = redisService.readHash(hashKey);
+ if (Objects.isNull(map)) {
+ return Response.serverError().build();
+ }
+ return Response.ok(map).build();
+ }
+
@Path("reset")
@GET
public Response resetRedis() {
diff --git a/database-manipulation-tool/src/main/java/io/skodjob/dmt/service/RedisService.java b/database-manipulation-tool/src/main/java/io/skodjob/dmt/service/RedisService.java
index ca5ab5e..d1616dd 100644
--- a/database-manipulation-tool/src/main/java/io/skodjob/dmt/service/RedisService.java
+++ b/database-manipulation-tool/src/main/java/io/skodjob/dmt/service/RedisService.java
@@ -52,6 +52,10 @@ public List>> get(int amount, List c
return redisDataSource.pollMessages(amount, channels);
}
+ public Map readHash(String hashKey) {
+ return redisDataSource.readHash(hashKey);
+ }
+
public void resetRedis() {
redisDataSource.flushRedis();
}
diff --git a/database-manipulation-tool/src/main/java/io/skodjob/dmt/sinkSources/RedisDataSource.java b/database-manipulation-tool/src/main/java/io/skodjob/dmt/sinkSources/RedisDataSource.java
index 469e1ad..9b8bd81 100644
--- a/database-manipulation-tool/src/main/java/io/skodjob/dmt/sinkSources/RedisDataSource.java
+++ b/database-manipulation-tool/src/main/java/io/skodjob/dmt/sinkSources/RedisDataSource.java
@@ -78,6 +78,11 @@ public List>> pollMessages(int maxAmount, Li
return jedis.xread(XReadParams.xReadParams().count(maxAmount), streams);
}
+ public Map readHash(String hashKey) {
+ Jedis jedis = pool.getResource();
+ return jedis.hgetAll(hashKey);
+ }
+
public void flushRedis() {
Jedis jedis = pool.getResource();
jedis.flushAll();
diff --git a/load-generator/pom.xml b/load-generator/pom.xml
index 0efe5ca..65b5235 100644
--- a/load-generator/pom.xml
+++ b/load-generator/pom.xml
@@ -49,7 +49,7 @@
- 17
+ 21
2.0.3
2.13.4.2
1.9.0
diff --git a/pom.xml b/pom.xml
index a058a7f..dae4139 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,9 +44,9 @@
- 17
- 3.11.0
- 17
+ 21
+ 3.13.0
+ 21
UTF-8
UTF-8
quarkus-bom