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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerMetadataInspector.java:
##########
@@ -408,18 +399,18 @@ private boolean checkAndRepair(JsonObject parent,
         return repaired;
       };
 
-      JsonObject usedBytesError = buildErrorAndRepair("dBMetadata." +
+      ObjectNode usedBytesError = buildErrorAndRepair("dBMetadata." +
               OzoneConsts.CONTAINER_BYTES_USED, usedBytesAggregate, 
usedBytesDB,
           keyRepairAction);
       errors.add(usedBytesError);
     }
 
     // check and repair if db delete count mismatches delete transaction count.
-    final JsonElement pendingDeleteCountDB = dBMetadata.get(
+    JsonNode pendingDeleteCountDB = dBMetadata.path(
         OzoneConsts.PENDING_DELETE_BLOCK_COUNT);
     final long dbDeleteCount = jsonToLong(pendingDeleteCountDB);
-    final JsonElement pendingDeleteCountAggregate
-        = aggregates.get(PendingDelete.COUNT);
+    final JsonNode pendingDeleteCountAggregate
+        = aggregates.path(PendingDelete.COUNT);

Review Comment:
   Done!



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueContainerMetadataInspector.java:
##########
@@ -463,32 +453,34 @@ private boolean checkAndRepair(JsonObject parent,
         return repaired;
       };
 
-      JsonObject chunksDirError = 
buildErrorAndRepair("chunksDirectory.present",
-          new JsonPrimitive(true), chunksDirPresent, dirRepairAction);
+      ObjectNode chunksDirError =
+          buildErrorAndRepair("chunksDirectory.present",
+              JsonNodeFactory.instance.booleanNode(true), chunksDirPresent,
+              dirRepairAction);

Review Comment:
   Done!



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/conf/HddsConfServlet.java:
##########
@@ -28,13 +28,12 @@
 import java.util.Map;
 import java.util.Properties;
 
-import com.google.common.base.Strings;

Review Comment:
   Done!



-- 
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