hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1705) Recon: Add estimatedTotalCount to the response of containers and containers/{id} endpoints
Date Wed, 03 Jul 2019 23:47:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-1705?focusedWorklogId=271943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271943
]

ASF GitHub Bot logged work on HDDS-1705:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/19 23:46
            Start Date: 03/Jul/19 23:46
    Worklog Time Spent: 10m 
      Work Description: swagle commented on pull request #1055: HDDS-1705. Recon: Add estimatedTotalCount
to the response of ...
URL: https://github.com/apache/hadoop/pull/1055#discussion_r300188458
 
 

 ##########
 File path: hadoop-ozone/ozone-recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ContainerKeyMapperTask.java
 ##########
 @@ -144,24 +150,35 @@ private void  deleteOMKeyFromContainerDB(String key)
         Table.KeyValue<ContainerKeyPrefix, Integer>> containerIterator =
         containerDBServiceProvider.getContainerTableIterator();
 
-    Set<ContainerKeyPrefix> keysToDeDeleted = new HashSet<>();
+    Set<ContainerKeyPrefix> keysToBeDeleted = new HashSet<>();
 
     while (containerIterator.hasNext()) {
       Table.KeyValue<ContainerKeyPrefix, Integer> keyValue =
           containerIterator.next();
       String keyPrefix = keyValue.getKey().getKeyPrefix();
       if (keyPrefix.equals(key)) {
-        keysToDeDeleted.add(keyValue.getKey());
+        keysToBeDeleted.add(keyValue.getKey());
       }
     }
 
-    for (ContainerKeyPrefix containerKeyPrefix : keysToDeDeleted) {
+    for (ContainerKeyPrefix containerKeyPrefix : keysToBeDeleted) {
       containerDBServiceProvider.deleteContainerMapping(containerKeyPrefix);
+
+      // decrement count and update containerKeyCount.
+      Long containerID = containerKeyPrefix.getContainerId();
+      long keyCount =
+          containerDBServiceProvider.getKeyCountForContainer(containerID);
+      if (keyCount > 0) {
+        containerDBServiceProvider.storeContainerKeyCount(containerID,
 
 Review comment:
   Is this to keep counts up to date? Seems this change is not needed for this test, right?
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 271943)
    Time Spent: 2h  (was: 1h 50m)

> Recon: Add estimatedTotalCount to the response of containers and containers/{id} endpoints
> ------------------------------------------------------------------------------------------
>
>                 Key: HDDS-1705
>                 URL: https://issues.apache.org/jira/browse/HDDS-1705
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>          Components: Ozone Recon
>    Affects Versions: 0.4.0
>            Reporter: Vivek Ratnavel Subramanian
>            Assignee: Vivek Ratnavel Subramanian
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message