You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/13 19:56:14 UTC

[GitHub] [hadoop-ozone] swagle commented on a change in pull request #675: HDDS-3170. Fix issues in File count by size task.

swagle commented on a change in pull request #675: HDDS-3170. Fix issues in File count by size task.
URL: https://github.com/apache/hadoop-ozone/pull/675#discussion_r392438979
 
 

 ##########
 File path: hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OMDBUpdatesHandler.java
 ##########
 @@ -88,30 +93,47 @@ private void processEvent(int cfIndex, byte[] keyBytes, byte[]
       valueBytes, OMDBUpdateEvent.OMDBUpdateAction action)
       throws IOException {
     String tableName = tablesNames.get(cfIndex);
-    Class keyType = getKeyType();
+    Class<String> keyType = getKeyType();
     Class valueType = getValueType(tableName);
     if (valueType != null) {
       OMDBUpdateEvent.OMUpdateEventBuilder builder =
           new OMDBUpdateEvent.OMUpdateEventBuilder<>();
       builder.setTable(tableName);
+      builder.setAction(action);
 
-      Object key = codecRegistry.asObject(keyBytes, keyType);
+      String key = codecRegistry.asObject(keyBytes, keyType);
       builder.setKey(key);
 
-      if (!action.equals(OMDBUpdateEvent.OMDBUpdateAction.DELETE)) {
+      if (action.equals(PUT)) {
 
 Review comment:
   Minor: Can be changed to == enum compare instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org