smengcl commented on code in PR #4266:
URL: https://github.com/apache/ozone/pull/4266#discussion_r1120691644


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/NSSummaryTaskWithLegacy.java:
##########
@@ -87,10 +87,16 @@ public boolean processWithLegacy(OMUpdateEventBatch events) 
{
       String updatedKey = omdbUpdateEvent.getKey();
 
       try {
-        OMDBUpdateEvent<String, OmKeyInfo> keyTableUpdateEvent =
-            (OMDBUpdateEvent<String, OmKeyInfo>) omdbUpdateEvent;
-        OmKeyInfo updatedKeyInfo = keyTableUpdateEvent.getValue();
-        OmKeyInfo oldKeyInfo = keyTableUpdateEvent.getOldValue();
+        OMDBUpdateEvent<String, ?> keyTableUpdateEvent = omdbUpdateEvent;
+        Object value = keyTableUpdateEvent.getValue();
+        Object oldValue = keyTableUpdateEvent.getOldValue();
+        if (!(value instanceof OmKeyInfo)) {
+          LOG.debug("Unexpected value type for key. Skipping processing.",

Review Comment:
   need the bracket placeholders to actually insert the value parameters
   
   ```suggestion
             LOG.debug("Unexpected value type '{}' for key '{}'. Skipping 
processing.",
   ```



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