This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new d16f9e2580 fixes trace logging in fate (#5821)
d16f9e2580 is described below
commit d16f9e25807c3b3fabd8cb387664831499044a2e
Author: Keith Turner <[email protected]>
AuthorDate: Fri Aug 22 18:20:10 2025 -0400
fixes trace logging in fate (#5821)
Avoid using GSON to serialize Fate Repos for trace logging because in
JDK 17 GSON can not access private members of java classes like Duration
and fails. #5818
---
server/manager/pom.xml | 4 ----
.../java/org/apache/accumulo/manager/tableOps/TraceRepo.java | 9 +--------
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/server/manager/pom.xml b/server/manager/pom.xml
index cb52ea5681..0c7e154321 100644
--- a/server/manager/pom.xml
+++ b/server/manager/pom.xml
@@ -40,10 +40,6 @@
<artifactId>auto-service</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
diff --git
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/TraceRepo.java
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/TraceRepo.java
index 055fae9644..85706016f8 100644
---
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/TraceRepo.java
+++
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/TraceRepo.java
@@ -18,8 +18,6 @@
*/
package org.apache.accumulo.manager.tableOps;
-import static org.apache.accumulo.core.util.LazySingletons.GSON;
-
import org.apache.accumulo.core.clientImpl.thrift.TInfo;
import org.apache.accumulo.core.fate.FateId;
import org.apache.accumulo.core.fate.Repo;
@@ -115,14 +113,9 @@ public class TraceRepo<T> implements Repo<T> {
*/
public static String toLogString(Repo<Manager> repo) {
if (repo instanceof TraceRepo) {
- // There are two reasons the repo is unwrapped. First I could not figure
out how to get this
- // to work with Gson. Gson kept serializing nothing for the generic
pointer TraceRepo.repo.
- // Second I thought this information was not useful for logging.
repo = ((TraceRepo<Manager>) repo).repo;
}
- // Inorder for Gson to work with generic types, the following passes
repo.getClass() to Gson.
- // See the Gson javadoc for more info.
- return repo.getClass() + " " + GSON.get().toJson(repo, repo.getClass());
+ return repo.getClass() + " " + repo.getName();
}
}