ArafatKhan2198 commented on code in PR #6500:
URL: https://github.com/apache/ozone/pull/6500#discussion_r1567094853


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/EventQueue.java:
##########
@@ -79,17 +70,13 @@ public EventQueue(String threadNamePrefix) {
   // The field parent in DatanodeDetails class has the circular reference
   // which will result in Gson infinite recursive parsing. We need to exclude
   // this field when generating json string for DatanodeDetails object
-  static class DatanodeDetailsGsonExclusionStrategy
-          implements ExclusionStrategy {
-    @Override
-    public boolean shouldSkipField(FieldAttributes f) {
-      return f.getDeclaringClass() == NodeImpl.class
-              && f.getName().equals("parent");
-    }
-
-    @Override
-    public boolean shouldSkipClass(Class<?> aClass) {
-      return false;
+  public String serializeObject(Object obj) {
+    try {
+      return JsonUtils.toJsonString(obj);
+    } catch (Exception e) {
+      // Handle the exception, maybe log it
+      LOG.error("Error serializing object: ", e);

Review Comment:
   These are the steps I followed to replicate:-
   
   1. Started an unsecure ozone cluster on docker
   2. Ran a freon command to create multiple files
   3. While the files were getting created I executed the command ozone insight 
logs -v scm.event-queue
   
   But I got No value present for it hence no parsing of any sort happened 
hence I could not see the error in SCM logs
   Do you know how I can replicate it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to